8주차 미션 [루가]#19
Open
ochyeon wants to merge 52 commits into
Open
Conversation
…(record 사용, 엔드포인트 수정 및 스웨거 명세 추가)
…Id를 경로 변수로 받도록 수정
…tId를 경로 변수로 받도록 수정
This reverts commit 4945095.
yangjiae12
approved these changes
May 26, 2026
Member
yangjiae12
left a comment
There was a problem hiding this comment.
회원가입을 기존에 구현해두신 것 같은데 8주차 미션 요구사항에 맞춰 수정하면 좋을 것 같습니다~
| public record SignupReqDto ( | ||
| @NotBlank String name, | ||
| @NotBlank @Email String email, | ||
| @NotBlank @Size(min = 0, message = "비밀번호는 8자 이상이어야 합니다.") String password, |
Member
There was a problem hiding this comment.
비밀번호 검증에서 @Size(min = 0)으로 되어 있어 메시지의 “8자 이상” 조건과 실제 검증 조건이 맞지 않는 것 같습니다. min = 8로 수정하면 좋을 것 같습니다!
Comment on lines
+22
to
+24
| @Transactional | ||
| public UserResDto.SignupResDto signup(UserReqDto.SignupReqDto request) { | ||
|
|
Member
There was a problem hiding this comment.
회원가입 요구사항에 약관 동의가 포함되므로 현재 요청 DTO와 서비스 로직에 약관동의 관련 로직을 추가하면 좋겠습니다!
Comment on lines
+36
to
+38
| @Transactional | ||
| public UserResDto.AddFoodPreferenceResDto addFoodPreference( | ||
| Long userId, UserReqDto.AddFoodPreferenceReqDto request) { |
Member
There was a problem hiding this comment.
SignupReqDto에 음식 리스트를 포함하고 회원가입 트랜잭션 안에서 함께 저장하는 방식도 고려하면 좋을 것 같습니다.
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.
📌 구현 결과
build.gradle에 의존성 추가
User Entity에 password, role 추가
password는 8자 이상, role은 USER, ADMIN
UserService에 BCrypt 적용 (passwordEncoder)
global에 SecurityConfig 추가 -> UserService로 Bean 주입
구현 결과 : MySQL WorkBench에서 테스트 진행
global에 AuthErrorCode 생성 : 4001(인증 필요), 4003(권한 없음)
4001, 4003에 대한 EntryPoint & Handler 추가
SecurityConfig에 ExceptionHandling 추가 & 응답 형식 통일
구현 결과 : Swagger에서 Try out
[회원 가입 : Public API -> 정상적으로 가입되는 것을 확인함]
[Private API -> 리뷰 목록 확인 API를 활용하여 테스트, 4001 에러 코드 확인함]

❓ 리뷰 요청
🤔 질문
💬 기타 공유 사항
[7주차 미션 수정 사항]