-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: develop
Are you sure you want to change the base?
Feature join #5
Conversation
jpa,db μ°κ²°μ μν μμ‘΄μ± μ£Όμ λ° μ€μ μ§νκ³Ό νλ‘μ νΈ λλ ν°λ¦¬λͺ μ μ€νλ₯Ό λ°κ²¬νμ¬ μμ ν¨.
νμκ°μ κΈ°λ₯μ νμν entity , repository ,dto λ± ν΄λμ€ μμ±ν κΈ°λ₯ ꡬνν¨
ResponseEntityμ μλ΅ λ©μμ§λ₯Ό 컀μ€ν νκΈ° μν ν΄λμ€ μμ± λ° νμκ°μ μ λΉλ°λ²νΈλ₯Ό μνΈν νκΈ° μν ν΄λμ€ μμ±
P6spy μ μ©μ μν ν΄λμ€ μμ± λ° application.yml μ€μ μ§ν
λ‘κ·Έ νλ μ μν¬λ₯Ό logbackμμ log4j2λ‘ λ³κ²½ν¨.
Testcontainerλ₯Ό μ¬μ©ν μμλλ‘ ν μ€νΈ νκ²½μ ꡬμΆνκ³ μ€μ λ‘ λμνλμ§ νμΈνκΈ° μν ν μ€νΈ μ½λ μμ±
νμ κ°μ ν μ€νΈ λ‘μ§ μμ± λ° application-test.yml νμΌ μ€μ λ³κ²½ μ§ν
λΆνμν μ½λμ μ΄λ Έν μ΄μ μ κ±° λ° λλ½λ μ΄λ Έν μ΄μ μμ± μΆκ°
rest doc μ μ©νλ©΄μ λΆνμν ν μ€νΈ μ½λ μμ μ§ν
컨νΈλ‘€λ¬μ λ°νκ°κ³Ό λΉμ¦λμ€ λ‘μ§μμ μλͺ»λ κ°μ μ λ¬νκ³ λ°ννλ λΆλΆμ νμΈνμ¬ μμ μ§νν¨
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μμ μ μ νλ 컨벀μ
μ μνλ©΄ μ²μλ±μ₯νλ μ΄λ
Έν
μ΄μ
μ λν΄ μλ―λ₯Ό μ£ΌμμΌλ‘ μ€λͺ
νκΈ°
λ‘ νμλλ°μ.
μ£Όμ μ€λͺ
μΆκ° λΆνλλ¦¬κ² μ΅λλ€!
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 κΆμ₯) |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"?> |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devtools λ₯Ό μμ‘΄νμλ μ΄μ λ 무μμΈκ°μ?
π PR μ λͺ©
π λ³κ²½ μ¬ν (Changes)
π₯ κ΄λ ¨ μ΄μ (Related Issues)
π¬ 리뷰 μꡬμ¬ν
π΄ 체ν¬λ¦¬μ€νΈ (Checklist)