Conversation
Walkthrough새 프로필별 Spring Boot 설정 파일 두 개( Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User as Operator
participant App as Spring Boot App
participant Prof as Profile Resolver
participant JPA as Hibernate
User->>App: 앱 실행 (with --spring.profiles.active)
App->>Prof: 활성 프로필 결정
alt 프로필=create
Prof-->>App: create
App->>JPA: ddl-auto=create
Note right of JPA: 스키마 생성
else 프로필=createDrop
Prof-->>App: createDrop
App->>JPA: ddl-auto=create-drop
Note right of JPA: 시작 시 생성, 종료 시 드롭
else 프로필=dev
Prof-->>App: dev
App->>JPA: ddl-auto=validate
Note right of JPA: 매핑과 스키마 일치 검증(불일치 시 실패)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests
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.
Actionable comments posted: 0
🧹 Nitpick comments (4)
src/main/resources/application-dev.yml (1)
11-13: 루트 DEBUG는 소음/성능 이슈—타깃 로깅으로 축소 권장개발 편의성은 유지하되 루트 전체를 디버그로 두기보단 Hibernate SQL 중심으로 좁히면 로그 가독성과 성능 모두 좋아집니다.
logging: level: - root: debug + root: info + org.hibernate.SQL: debug + org.hibernate.type.descriptor.sql: tracesrc/main/resources/application-createDrop.yml (3)
9-9: EOF 개행 누락파일 끝 개행이 없어 도구에 따라 경고가 발생합니다. 한 줄 추가해 주세요.
- on-profile: createDrop + on-profile: createDrop +
7-9: 프로필 네이밍 일관성 제안값이
create-drop인 것과 맞추어 프로필명을create-drop으로 통일하면 혼동이 줄어듭니다(선택). 변경 시 전역 참조도 함께 업데이트 필요.- on-profile: createDrop + on-profile: create-drop추가로 파일명을
application-create-drop.yml로 맞추는 것도 고려해 주세요.
1-9: create-drop 프로필 문서화 및 사용 범위 격리 권장
로컬/테스트 전용임을 README.md와 해당 YAML 파일 주석에 명시하고, CI/CD 및 런타임 설정에서createDrop프로필이 다른 환경에 활성화되지 않도록 이중 확인하세요.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/resources/application-create.yml(1 hunks)src/main/resources/application-createDrop.yml(1 hunks)src/main/resources/application-dev.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
src/main/resources/application-createDrop.yml
[error] 9-9: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (2)
src/main/resources/application-create.yml (1)
2-9: 파괴적 DDL(create) 프로필: 리소스 내 활성화 설정 미발견, 운영·CI 환경 변수 검증 필요
application-create.yml과 application-createDrop.yml에서ddl-auto: create/create-drop만 정의되어 있으며,spring.profiles.active설정은 없습니다. 코드 레벨에서는 실수로 프로필이 활성화될 위험이 없으니, 운영·CI 환경의SPRING_PROFILES_ACTIVE에create또는createDrop프로필이 포함되지 않도록 별도 확인하세요.src/main/resources/application-dev.yml (1)
5-5: dev 환경ddl-auto: validate설정 확인 요청
프로젝트pom.xml/build.gradle등에서 Flyway·Liquibase 의존성이나src/main/resources/db/migration스크립트가 발견되지 않습니다.
‘validate’가 의도대로 스키마 검증만 수행하도록, 필요한 마이그레이션 도구 설정이 제대로 적용됐는지 확인해주세요.
jpa ddl 환경 설정
Summary by CodeRabbit
New Features
Chores