-
Notifications
You must be signed in to change notification settings - Fork 1
[REFACTOR/#226] 불필요한 라이브러리 제거(mysql, fixturemonkey...) #227
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
Conversation
Summary by CodeRabbit릴리스 노트
Walkthroughbuild.gradle.kts에서 불필요한 라이브러리 의존성을 제거했습니다. JWT 관련 라이브러리(jjwt-api, jjwt-impl, jjwt-jackson), ArchUnit, Fixture Monkey Starter 테스트 의존성 및 MySQL 커넥터를 삭제하고 PostgreSQL 런타임 의존성을 유지했습니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 분
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
build.gradle.kts (2)
40-71: PostgreSQL 런타임 의존성 배치 위치 확인Line 62의
runtimeOnly("org.postgresql:postgresql")배치가 테스트 관련 의존성 블록(lines 67-70) 이전에 위치하고 있습니다. 일반적으로 런타임 의존성은 테스트 의존성과 구분되는 것이 좋으나, 현재 배치는 기능적으로 문제가 없습니다.H2 데이터베이스(line 70:
testRuntimeOnly("com.h2database:h2"))는 테스트 환경에서 사용될 것으로 예상되는데, PostgreSQL 드라이버가 런타임에만 포함되어 테스트 중 데이터베이스 의존성이 있다면 잠재적 영향이 있을 수 있습니다. 테스트 환경에서 올바른 데이터베이스를 사용 중인지 확인하십시오.
62-71: PostgreSQL과 H2 데이터베이스 드라이버 구성 확인Line 62의
runtimeOnly("org.postgresql:postgresql")는 프로덕션 런타임용이고, Line 70의testRuntimeOnly("com.h2database:h2")는 테스트용입니다. 이 구성이 정상적이나, 다음을 확인하세요:
- 테스트 환경에서 H2를 데이터베이스로 사용 중인지 확인
- 테스트 프로파일(
application-test.yaml)에 H2 설정이 있는지 확인- MySQL 제거가 기존 테스트나 개발 환경에 영향을 미치지 않는지 확인
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
build.gradle.kts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (4)
build.gradle.kts (4)
35-62: 의존성 제거 후 빌드 및 기능 테스트 검증 필수다음 라이브러리 제거가 확인되었습니다 (AI 요약 기반):
- JWT: jjwt-api, jjwt-impl, jjwt-jackson
- 테스트: ArchUnit, Fixture Monkey Starter
- 데이터베이스: MySQL connector
제거 후 다음 항목을 검증해야 합니다:
- 컴파일 에러 확인: 제거된 라이브러리에 의존하는 코드 존재 여부
- Spring Auto-configuration: 제거된 라이브러리의 auto-config이 활성화되어 있었는지 확인
- 테스트 커버리지: 기존 테스트가 여전히 실행 가능한지 확인 (특히 Fixture Monkey 제거의 영향)
- 런타임 기능: 모든 인증/보안 기능이 정상 작동하는지 확인
빌드 및 테스트 결과를 다음과 같이 검증해주세요:
./gradlew clean build실행 완료 확인./gradlew test전체 테스트 통과 확인- 애플리케이션 시작 로그에서 에러/경고 확인
62-62: 원본 검토 의견 재평가: 잘못된 분석제거된 JWT 라이브러리에 대한 우려는 근거 없음입니다.
코드 분석 결과:
- JJWT 라이브러리(jjwt-api, jjwt-impl, jjwt-jackson): 코드에서 사용되지 않음 (제거해도 안전)
- JWT 기능: Nimbus JOSE 라이브러리(com.nimbusds.jose)로 구현됨 (spring-boot-starter-oauth2-resource-server의 이행 종속성으로 유지)
- GoogleAuthService, AppleAuthService, JwksRetrieveService: 모두 Nimbus 라이브러리 사용 중
- 제거된 다른 의존성: ArchUnit, Fixture Monkey, MySQL 모두 코드에서 미사용
이 PR의 변경사항은 검증되었으며, Lambda 배포 크기 감소 목표에 적절합니다. 원본 검토 의견의 우려는 JJWT와 Nimbus JOSE를 혼동한 것입니다.
Likely an incorrect or invalid review comment.
35-62: 중요한 발견: 코드 분석 결과 원래 리뷰 의견이 잘못되었습니다.핵심 발견사항:
JWT 구현이 JJWT 라이브러리를 사용하지 않음
- 모든 JWT 코드는
org.springframework.security.oauth2.jwt.*에서 importcom.nimbusds라이브러리 사용 (spring-security-oauth2의 일부)io.jsonwebtoken(JJWT) 는 코드에서 한 번도 import되지 않음JWT는 프로젝트에서 적극 사용 중
- JwtRSAKeyConfiguration: JwtEncoder/JwtDecoder bean 정의
- JwtAuthAccessTokenService: 액세스 토큰 생성/검증
- JwtAuthRefreshTokenService: 리프레시 토큰 생성/검증
결론: JJWT 제거는 안전함
- JJWT 라이브러리는 이 프로젝트에서 사용되지 않는 미사용 의존성
- Spring Security OAuth2가 JWT 처리 담당
- 코드 기능에 영향 없음
Likely an incorrect or invalid review comment.
40-71: 의존성 제거 검증 완료 - 문제 없음정적 코드 분석 결과, 제거된 라이브러리들이 코드베이스에서 전혀 사용되지 않았음을 확인했습니다:
JWT (jjwt): 모든 소스 파일에서 jjwt 관련 import 또는 사용이 0건. 현재 코드는 Spring Security의 OAuth2 기반 JWT 구현(com.nimbusds)을 사용하고 있으며, 인증 관련 모든 컴포넌트(JwtProvider, JwtAuthAccessTokenService, JwtAuthRefreshTokenService, 보안 필터 등)가 정상 작동합니다.
Fixture Monkey: 테스트 디렉토리에서 0건 발견. 유일한 테스트 파일은 기본 context load 테스트만 포함되어 있습니다.
MySQL connector: 데이터베이스 드라이버는 PostgreSQL만 사용 중이며, MySQL 관련 코드 0건.
결론: 제거된 의존성들은 실제로 사용되지 않았으므로, 빌드 실패, 누락된 심볼, 테스트 영향, 인증 기능 장애는 발생하지 않습니다.
Related Issue 🚀
Work Description ✏️
PR Point 📸