Conversation
비밀번호 변경 시 새로운 비밀번호에 대한 Policy 검증 부분을 추가하였습니다.
|
Caution Review failedFailed to post review comments. WalkthroughThis update introduces a comprehensive backend foundation for a Spring Boot application, encompassing core domain models, repositories, services, controllers, security, configuration, and CI/CD pipeline. It implements user management, authentication (including JWT and social login), member profiles, address handling, group and budget management, category preferences, terms agreements, and robust error handling. Extensive unit and integration tests are included. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant LoginController
participant LoginService
participant MemberRepository
participant JwtTokenService
Client->>LoginController: POST /api/v1/auth/login (email, password)
LoginController->>LoginService: loginWithEmail(email, password)
LoginService->>MemberRepository: findByEmail(email)
MemberRepository-->>LoginService: Member
LoginService-->>LoginController: AuthResultDto (memberId, profileId, newUser)
LoginController->>JwtTokenService: createTokenDto(memberId, profileId)
JwtTokenService-->>LoginController: JwtTokenResponseDto
LoginController-->>Client: ApiResponse<JwtTokenResponseDto>
sequenceDiagram
participant Client
participant OAuth2Controller
participant SocialAuthService
participant LoginService
participant JwtTokenService
Client->>OAuth2Controller: POST /api/v1/auth/oauth2/code (provider, code)
OAuth2Controller->>SocialAuthService: getTokenResponse(provider, code)
SocialAuthService-->>OAuth2Controller: TokenDto
OAuth2Controller->>LoginService: socialLogin(TokenDto)
LoginService-->>OAuth2Controller: AuthResultDto
OAuth2Controller->>JwtTokenService: createTokenDto(memberId, profileId)
JwtTokenService-->>OAuth2Controller: JwtTokenResponseDto
OAuth2Controller-->>Client: ApiResponse<JwtTokenResponseDto>
sequenceDiagram
participant Client
participant MemberProfileController
participant MemberProfileService
participant MemberProfileRepository
Client->>MemberProfileController: GET /api/v1/members/profile/me
MemberProfileController->>MemberProfileService: getProfileFetch(profileId)
MemberProfileService->>MemberProfileRepository: findMemberProfileEntityGraphById(profileId)
MemberProfileRepository-->>MemberProfileService: MemberProfile
MemberProfileService-->>MemberProfileController: MemberProfile
MemberProfileController-->>Client: ApiResponse<MemberProfilePageResponse>
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. ✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
이 PR은 음식 추천 서비스의 기본적인 회원 관리 시스템을 구축하는 것을 목적으로 하며, 회원 도메인, 인증/권한, 음식 취향 관리, 예산 관리 등의 핵심 기능을 포함합니다.
- 완전한 회원 관리 시스템 (가입, 로그인, 프로필 관리)
- OAuth2 소셜 로그인 지원 (카카오, 구글)
- JWT 기반 인증 및 토큰 블랙리스트 관리
- 음식 카테고리 선호도 및 예산 관리 기능
Reviewed Changes
Copilot reviewed 106 out of 108 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| table.ddl | 회원, 프로필, 예산, 음식 취향 등 핵심 데이터베이스 스키마 정의 |
| domain/ | 회원, 그룹, 주소, 예산, 음식 카테고리 등 도메인 객체 구현 |
| service/ | 비즈니스 로직 처리 (로그인, 회원관리, 프로필관리, 소셜계정 관리) |
| web/controller/ | REST API 엔드포인트 구현 |
| security/ | JWT 토큰 서비스 및 블랙리스트 관리 |
| infrastructure/ | 외부 API 연동 (소셜 로그인, 주소 검색) |
| test/ | 단위 테스트, 통합 테스트, 컨트롤러 테스트 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @RequestBody JwtRefreshTokenRequest request) { | ||
| String accessToken = jwtTokenService.createAccessToken(memberDto.getMemberId(), memberDto.getProfileId()); | ||
| return ApiResponse.createSuccess( | ||
| new JwtRefreshedAccessTokenDto(accessToken, 3600, "Bearar") |
There was a problem hiding this comment.
Line 52에서 'Bearar'는 'Bearer'의 오타입니다.
| new JwtRefreshedAccessTokenDto(accessToken, 3600, "Bearar") | |
| new JwtRefreshedAccessTokenDto(accessToken, 3600, "Bearer") |
|
|
||
| void deleteMemberProfileByMember(Member member); | ||
|
|
||
| @EntityGraph(attributePaths = {"member", "addressHistory, group"}) |
There was a problem hiding this comment.
Line 18에서 문자열 형식이 잘못되었습니다. 'addressHistory, group' 대신 'addressHistory', 'group'으로 분리하거나 따옴표를 올바르게 처리해야 합니다.
| @EntityGraph(attributePaths = {"member", "addressHistory, group"}) | |
| @EntityGraph(attributePaths = {"member", "addressHistory", "group"}) |
| } | ||
|
|
||
| public boolean isProfileRegistered() { | ||
| return memberProfile == null; |
There was a problem hiding this comment.
로직이 반대입니다. 프로필이 등록되어 있으면 true를 반환해야 하므로 'return memberProfile != null;'이어야 합니다.
| return memberProfile == null; | |
| return memberProfile != null; |
| if (!findMember.isMatchedPassword(password)) { | ||
| throw new IllegalArgumentException("비밀번호가 일치하지 않습니다"); | ||
| } | ||
| boolean newUser = findMember.isProfileRegistered(); |
There was a problem hiding this comment.
isProfileRegistered() 메서드의 로직이 반대이므로, 여기서도 논리가 반전되어야 합니다. newUser 변수는 !findMember.isProfileRegistered()여야 하거나, 조건문을 수정해야 합니다.
| boolean newUser = findMember.isProfileRegistered(); | |
| boolean newUser = !findMember.isProfileRegistered(); |
| @Override | ||
| public Group findGroupByGroupId(Long groupId) { | ||
| return groupRepository.findById(groupId) | ||
| .orElseThrow(() -> new IllegalArgumentException("존재하지 않는 회원입니다")); |
There was a problem hiding this comment.
그룹을 찾는 메서드에서 에러 메시지가 '존재하지 않는 회원입니다'로 잘못되어 있습니다. '존재하지 않는 그룹입니다'로 수정해야 합니다.
| .orElseThrow(() -> new IllegalArgumentException("존재하지 않는 회원입니다")); | |
| .orElseThrow(() -> new IllegalArgumentException("존재하지 않는 그룹입니다")); |
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores
.gitignoreto manage workflow and configuration files.Tests