8주차 미션 [워니]#18
Open
ywkim1m wants to merge 15 commits into
Open
Conversation
Collaborator
|
8주차도 수고하셨습니다 |
yangjiae12
approved these changes
May 24, 2026
Member
yangjiae12
left a comment
There was a problem hiding this comment.
회원가입 시에 약관 동의와 선호 음식 선택이 요구사항에 포함되어 있었는데, 누락된 것 같아 보입니다! 이 부분 반영하시면 좋을 것 같아요~
| private final PasswordEncoder passwordEncoder; | ||
|
|
||
| @Transactional | ||
| public MemberSignupResponse signup(MemberSignupRequest request) { |
Member
There was a problem hiding this comment.
회원가입 전에 동일 이메일로 이미 가입된 회원이 있는지 확인하는 로직이 있으면 좋을 것 같습니다!
Comment on lines
+25
to
+29
| Member member = Member.builder() | ||
| .email(request.getEmail()) | ||
| .password(passwordEncoder.encode(request.getPassword())) | ||
| .nickname(request.getNickname()) | ||
| .build(); |
Member
There was a problem hiding this comment.
MemberSignupRequest에는 이름, 성별, 생년월일, 주소가 필수값으로 정의되어 있는데, 실제 Member 생성 시에는 email, password, nickname만 저장되고 있는 것 같습니다. 회원가입 요청에서 받은 필수 정보들이 실제 엔티티에도 반영되도록 추가하면 좋을 것 같습니다.
Comment on lines
+25
to
+38
| Member member = Member.builder() | ||
| .email(request.getEmail()) | ||
| .password(passwordEncoder.encode(request.getPassword())) | ||
| .nickname(request.getNickname()) | ||
| .build(); | ||
|
|
||
| memberRepository.save(member); | ||
|
|
||
| return MemberSignupResponse.builder() | ||
| .memberId(member.getId()) | ||
| .email(member.getEmail()) | ||
| .nickname(member.getNickname()) | ||
| .build(); | ||
| } |
Member
There was a problem hiding this comment.
Member 엔티티 생성과 응답 DTO 생성 로직은 Converter로 분리하면 좋을 것 같습니다. Service에는 회원가입 흐름과 검증 로직만 남겨두면 역할이 더 명확해질 것 같습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 구현 결과
/api/members/signup→ Public워크북
미션
Member에 email, password 추가회원가입 시 password를
BCryptPasswordEncoder로 암호화/auth/**또는 회원가입 API만permitAll()나머지
.authenticated()+ exceptionHandling 적용❓ 리뷰 요청
🤔 질문
💬 기타 공유 사항