-
Notifications
You must be signed in to change notification settings - Fork 3
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
[10주차] API개발 미션(KoSeonJe) #3
base: main
Are you sure you want to change the base?
Conversation
KoSeonJe
commented
Sep 13, 2023
•
edited
Loading
edited


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.
수정 부탁드립니다!
memberService.createUser(createMemberRequest); | ||
} | ||
|
||
@PutMapping(value = "/{memberId}") |
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.
value 없어도 됨!
|
||
private String name; | ||
|
||
} |
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.
toEntity()
} | ||
|
||
@GetMapping(value = "/{memberId}") | ||
public MemberResponse getMemberInfo(@PathVariable Long memberId) { |
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.
ResponseEntity
memberRepository.save(member); | ||
} | ||
|
||
public MemberResponse getMemberInfo(Long memberId) { |
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.
dto에 대한 변환 책임을 controller에서 변환하는 게 옳은가? service에서 변환이 옳은가? 한번 차이를 비교해보면 좋겠다.
memberRepository.save(member); | ||
} | ||
|
||
public MemberResponse getMemberInfo(Long memberId) { |
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.
readOnly 설정
public void updateUserInfo(Long memberId, UpdateMemberRequest updateMemberRequest) { | ||
Member member = findOneUser(memberId); | ||
member.update(updateMemberRequest.getAuthId(), updateMemberRequest.getName()); | ||
memberRepository.save(member); |
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.
공백 제거
|
||
private final PostRepository postRepository; | ||
|
||
private final MemberService memberService; |
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.
service vs repository
spring: | ||
datasource: | ||
url: jdbc:mysql://localhost:3306/cow?createDatabaseIfNotExist=true | ||
driver-class-name: com.mysql.cj.jdbc.Driver | ||
username: root | ||
password: 1234 | ||
|
||
|
||
jpa: | ||
hibernate: | ||
ddl-auto: create | ||
properties: | ||
hibernate: | ||
show_sql: true | ||
format_sql: true | ||
|
||
server: | ||
port: 9090 |
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.
이런 yml파일에 컬럼들을 암호화를 한다던가? 혹은 직접 github에 노출시키지 않는 방법?
1.jasypt
2. github secrets