Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature join #5

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Feature join #5

wants to merge 10 commits into from

Conversation

CUCU7103
Copy link
Collaborator

πŸ“Œ PR 제λͺ©

  • νšŒμ›κ°€μž… 둜직 및 ν”„λ‘œμ νŠΈ λ‘œκΉ… μ„€μ •

πŸš€ λ³€κ²½ 사항 (Changes)

  1. νšŒμ›κ°€μž… 둜직 μž‘μ„±
  2. νšŒμ›κ°€μž… μ‹œ λΉ„λ°€λ²ˆν˜Έ μ•”ν˜Έν™” ν•˜μ—¬ μ €μž₯
  3. νšŒμ›κ°€μž… 둜직 ν…ŒμŠ€νŠΈ μ½”λ“œ μž‘μ„±
  4. ν”„λ‘œμ νŠΈ λ‘œκΉ… μ„€μ • 진행
    • log4j2 적용
    • p6spy 적용

πŸ’₯ κ΄€λ ¨ 이슈 (Related Issues)

πŸ’¬ 리뷰 μš”κ΅¬μ‚¬ν•­

🚴 체크리슀트 (Checklist)

  • else ν‚€μ›Œλ“œ μ‚¬μš©ν•˜μ§€ μ•ŠκΈ°
  • getter/setter/propertyλ₯Ό 쓰지 μ•ŠκΈ°
  • ν•œ 쀄에 점을 ν•˜λ‚˜λ§Œ 찍기 (λ””λ―Έν„°μ˜ 법칙)
  • ν…ŒμŠ€νŠΈ μ½”λ“œ μž‘μ„±μ—¬λΆ€
  • 넀이버 μ½”λ“œ μ»¨λ²€μ…˜ μ€€μˆ˜μ—¬λΆ€

jpa,db 연결을 μœ„ν•œ μ˜μ‘΄μ„± μ£Όμž… 및 μ„€μ • 진행과 ν”„λ‘œμ νŠΈ 디렉터리λͺ…에
μ˜€νƒ€λ₯Ό λ°œκ²¬ν•˜μ—¬ μˆ˜μ •ν•¨.
νšŒμ›κ°€μž… κΈ°λŠ₯에 ν•„μš”ν•œ entity , repository ,dto λ“± 클래슀 생성후 κΈ°λŠ₯ κ΅¬ν˜„ν•¨
ResponseEntity의 응닡 λ©”μ‹œμ§€λ₯Ό μ»€μŠ€ν…€ν•˜κΈ° μœ„ν•œ 클래슀 생성 및 νšŒμ›κ°€μž…μ‹œ λΉ„λ°€λ²ˆν˜Έλ₯Ό μ•”ν˜Έν™” ν•˜κΈ°
μœ„ν•œ 클래슀 생성
P6spy μ μš©μ„ μœ„ν•œ 클래슀 생성 및 application.yml μ„€μ • 진행
둜그 ν”„λ ˆμž„ μ›Œν¬λ₯Ό logbackμ—μ„œ log4j2둜 변경함.
Testcontainerλ₯Ό μ‚¬μš©ν•  μˆ˜μžˆλ„λ‘  ν…ŒμŠ€νŠΈ ν™˜κ²½μ„ κ΅¬μΆ•ν•˜κ³  μ‹€μ œλ‘œ λ™μž‘ν•˜λŠ”μ§€ ν™•μΈν•˜κΈ° μœ„ν•œ ν…ŒμŠ€νŠΈ μ½”λ“œ μž‘μ„±
νšŒμ› κ°€μž… ν…ŒμŠ€νŠΈ 둜직 μž‘μ„± 및 application-test.yml 파일 μ„€μ • λ³€κ²½ 진행
λΆˆν•„μš”ν•œ μ½”λ“œμ™€ μ–΄λ…Έν…Œμ΄μ…˜ 제거 및 λˆ„λ½λœ μ–΄λ…Έν…Œμ΄μ…˜ 속성 μΆ”κ°€
rest doc μ μš©ν•˜λ©΄μ„œ λΆˆν•„μš”ν•œ ν…ŒμŠ€νŠΈ μ½”λ“œ μ‚­μ œ 진행
컨트둀러의 λ°˜ν™˜κ°’κ³Ό λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ—μ„œ 잘λͺ»λœ 값을 μ „λ‹¬ν•˜κ³  λ°˜ν™˜ν•˜λŠ” 뢀뢄을 ν™•μΈν•˜μ—¬

μˆ˜μ • 진행함
@CUCU7103 CUCU7103 self-assigned this Nov 22, 2024
Copy link
Collaborator

@f-lab-jd f-lab-jd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€! λ¦¬λ·°λ“œλ¦° λ‚΄μš© 확인 ν›„ λ‹΅λ³€ λΆ€νƒλ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€~

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

@EnableJpaAuditing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ˜ˆμ „μ— μ •ν–ˆλ˜ μ»¨λ²€μ…˜μ— μ˜ν•˜λ©΄ μ²˜μŒλ“±μž₯ν•˜λŠ” μ–΄λ…Έν…Œμ΄μ…˜μ— λŒ€ν•΄ μ˜λ―€λ₯Ό μ£Όμ„μœΌλ‘œ μ„€λͺ…ν•˜κΈ° 둜 ν–ˆμ—ˆλŠ”λ°μš”.
주석 μ„€λͺ… μΆ”κ°€ λΆ€νƒλ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ„€ 이후 pr에 μˆ˜μ •ν•˜μ—¬ μ˜¬λ ΈμŠ΅λ‹ˆλ‹€!

import spring.academyPlatform.user.dto.UserInsertResponseDto;

@Component
public class UserMapper {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UserMapper λ₯Ό Component 둜 λ“±λ‘ν•˜μ‹  μ΄μœ κ°€ λ¬΄μ—‡μΈκ°€μš”?

@@ -0,0 +1,40 @@
package spring.academyPlatform.global.mapper;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global νŒ¨ν‚€μ§€μ˜ 기쀀은 λ¬΄μ—‡μΈκ°€μš”? UserMapper λ₯Ό global νŒ¨ν‚€μ§€ ν•˜μœ„μ— 두신 μ΄μœ κ°€ κΆκΈˆν•©λ‹ˆλ‹€.


// Bcryptλ₯Ό μ‚¬μš©ν•΄ λΉ„λ°€λ²ˆν˜Έλ₯Ό ν•΄μ‹±ν•˜λŠ” λ©”μ„œλ“œ
public static String hashPassword(String password) {
int cost = 8; // 반볡 횟수 (보톡 10~12 ꢌμž₯)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맀직 λ„˜λ²„λŠ” μƒμˆ˜λ‘œ λΉΌλŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.


// ν•΄μ‹±λœ λΉ„λ°€λ²ˆν˜Έμ™€ μ‚¬μš©μžκ°€ μž…λ ₯ν•œ λΉ„λ°€λ²ˆν˜Έλ₯Ό κ²€μ¦ν•˜λŠ” λ©”μ„œλ“œ
public static boolean checkPassword(String password, String hashedPassword) {
return BCrypt.checkpw(password, hashedPassword);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bcrypt 의 λ™μž‘μ›λ¦¬λŠ” 무엇이고 μ„ νƒν•˜μ‹  μ΄μœ κ°€ λ¬΄μ—‡μΈκ°€μš”~?

@Column
private String deletedYn;

@Builder
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Builder λ₯Ό ν΄λž˜μŠ€λ‹¨μœ„λ‘œ μ§€μ •ν•˜λŠ” 것과 μƒμ„±μžλ‘œ μ§€μ •ν•˜λŠ” κ²ƒμ˜ 기쀀은 λ¬΄μ—‡μΈκ°€μš”?

format_sql: true # SQL 좜λ ₯ μ‹œ 보기 μ’‹κ²Œ μ •λ ¬ν•˜μ—¬ 좜λ ₯
show_sql: true # μ½˜μ†”μ— μ‹€ν–‰λ˜λŠ” SQL 문을 ν‘œμ‹œν•˜μ—¬ 디버깅에 도움
# Spring Bootμ—μ„œ View λ Œλ”λ§ 쀑에 λ°μ΄ν„°λ² μ΄μŠ€μ™€μ˜ 연결이 μ—΄λ € μžˆλ„λ‘ ν•΄μ£ΌλŠ” μ˜΅μ…˜
open-in-view: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 μ„€μ •μ˜ λͺ©μ μ€ λ¬΄μ—‡μΈκ°€μš”~? 기본값은 λ¬΄μ—‡μΌκΉŒμš”?

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log4j2 μ„€μ • νŒŒμΌμ„ μΆ” ν›„μ—λŠ” profile λ§ˆλ‹€ κ΅¬λΆ„ν•΄μ„œ 생성해두면 더 쒋을 것 κ°™μŠ΅λ‹ˆλ‹€.

@@ -17,6 +17,10 @@ configurations {
compileOnly {
extendsFrom annotationProcessor
}
configureEach {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 μ„€μ •μ˜ λͺ©μ μ€ λ¬΄μ—‡μΈκ°€μš”~?


runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'

developmentOnly 'org.springframework.boot:spring-boot-devtools'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

devtools λ₯Ό μ˜μ‘΄ν•˜μ‹œλŠ” μ΄μœ λŠ” λ¬΄μ—‡μΈκ°€μš”?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants