[feat] #5 - swagger & security config 추가 - #6
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughSwagger 의존성과 OpenAPI 정보 설정이 추가됐고, Spring Boot 플러그인 및 테스트 의존성이 정리됐다. 또한 Spring Security 기본 필터 체인이 새로 등록되어 CSRF, form login, http basic을 끄고 Swagger 경로와 전체 요청을 허용하도록 구성됐다. ChangesSwagger 및 Security 설정
Estimated review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
P2) 솝트 1차 과제 제출 페이지를 구경하다가(어느 팀인지는 기억이 안 나지만,,) 현재 최신 버전인 Spring Boot 4.1.x는 일부 주요 라이브러리의 호환성이 아직 충분히 검증되지 않았다는 내용을 본 적이 있습니다. 프로젝트의 안정적인 개발과 운영을 위해 조금 더 검증된 버전으로 사용하는 것도 괜찮을 것 같습니다..!!
찾아본 바로는 OAuth2와 Spring Security 관련 예제나 자료들이 대부분 Spring Boot 3.x를 기준으로 작성되어 있어서 참고할 자료도 많고, 호환성 측면에서도 장점이 있는 것 같습니다. 다만 제가 봤던 팀은 4.0.x 버전을 사용했던 것 같기도 해서, 이 부분은 한 번 같이 확인해 보면 좋을 것 같습니다!
There was a problem hiding this comment.
오 글쿤요 요것도 한번 확인 한 뒤 제가 바꾸는것 보다는 다같이 다시 이야기 해보면 좋을것 같습니당 감사합니당
| testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test' | ||
| testImplementation 'org.springframework.boot:spring-boot-starter-validation-test' | ||
| testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test' |
There was a problem hiding this comment.
P4) 테스트 의존성이 개별 패키지로 추가되어 있는 것 같은데, spring-boot-starter-test를 사용하면 대부분의 테스트 라이브러리가 함께 포함되어 관리하기 편한 것으로 알고 있습니다!!. 특별한 이유가 없다면 해당 스타터를 사용하는 것도 고려해 보면 좋을 것 같습니당
There was a problem hiding this comment.
오 대박! 바로 수정하겠습니당 감사합니당!
laura-jung
left a comment
There was a problem hiding this comment.
확인 완료했습니다.
아직 프로젝트 적으로 개발된 게 없어서 다 허용으로 열어두신 것 같은데 TODO 주석 활용하여 후에 수정을 염두해두는게 좋을 것 같아요!
수고하셨습니다!
| "/swagger-ui.html", | ||
| "/v3/api-docs/**" | ||
| ).permitAll() | ||
| .anyRequest().permitAll()); |
There was a problem hiding this comment.
p4)anyRequest().permitAll()은 인증 기능 구현 전 임시 설정으로는 좋은 것 같습니다
다만 이 상태로 머지되면 이후 추가되는 API도 기본적으로 모두 공개되기 때문에, JWT 적용 시점에 놓치지 않도록 TODO 주석을 남겨놓으면 좋을 것 같아요!
There was a problem hiding this comment.
네넹 요건 todo 주석 남겨두도록 하겠습니다.
감사합니다
There was a problem hiding this comment.
gradle 분류 작업 해주셔서 감사합니다.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
build.gradle (1)
34-35: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winSpring Boot 3.x에 맞는 springdoc 2.x로 내려야 합니다.
springdoc-openapi-starter-webmvc-ui:3.0.3는 Spring Boot 4.x 라인입니다. 현재Spring Boot 3.5.15와 섞으면 Swagger 초기화/부팅 단계에서 호환성 문제가 날 수 있으니2.8.17같은 2.x로 맞추세요.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@build.gradle` around lines 34 - 35, The API documentation dependency is on the wrong springdoc major version for the current Spring Boot 3.x setup. Update the dependency in build.gradle from springdoc-openapi-starter-webmvc-ui:3.0.3 to a compatible 2.x release such as 2.8.17, keeping the change localized to the Swagger/OpenAPI dependency declaration.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@build.gradle`:
- Around line 34-35: The API documentation dependency is on the wrong springdoc
major version for the current Spring Boot 3.x setup. Update the dependency in
build.gradle from springdoc-openapi-starter-webmvc-ui:3.0.3 to a compatible 2.x
release such as 2.8.17, keeping the change localized to the Swagger/OpenAPI
dependency declaration.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c18a2111-19f6-4a5e-aa43-3d1e846a49fe
📒 Files selected for processing (2)
build.gradlesrc/main/java/com/Timo/Timo/global/config/SecurityConfig.java
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/java/com/Timo/Timo/global/config/SecurityConfig.java
4939707 to
517ed99
Compare
관련 이슈 🛠
작업 내용 요약 ✏️
주요 변경 사항 🛠️
트러블 슈팅 ⚽️
JPA 의존성이 존재하지만 DataSource 설정이 없어 애플리케이션 실행 시 다음 오류가 발생했고
Swagger와 Security 설정을 우선 확인하기 위해 로컬 application.yml에서 DataSource 자동 설정을 임시 제외했습니다.
설정은 DB 연동 전까지 사용하는 임시 로컬 설정이고 이번 PR에는 포함하지 않았어요
테스트 결과 📄
스크린샷 📷
추가예정
리뷰 요구사항 📢
📎 참고 자료 (선택)
지금
application.yml이 gitignore에 들어가 있어서 나중에 공통으로 추가되는 설정들이 생기면 팀원들이 각자 따로 맞춰야 할 수도 있을 것 같아요앞으로 DB나 배포 관련 설정도 추가될 수 있어서 미리 관리 방식을 한번 정해두면 좋을 것 같아요. 관련해서 찾아본 블로그가 있는데 티모 규모에는 어떤 방식이 괜찮을지 데일리 스크럼 때 같이 얘기해보면 좋겠습니다!
참고블로그
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Chores