Skip to content

Chore: 패키지 구조 설정#1

Open
stoneTiger0912 wants to merge 4 commits intomainfrom
chore/create-package
Open

Chore: 패키지 구조 설정#1
stoneTiger0912 wants to merge 4 commits intomainfrom
chore/create-package

Conversation

@stoneTiger0912
Copy link
Member

@stoneTiger0912 stoneTiger0912 commented Feb 5, 2026

Summary by CodeRabbit

릴리스 노트

  • 설정

    • 애플리케이션 설정 구조가 개선되었습니다.
    • 데이터베이스 연결, 캐시, 클라우드 서비스 구성을 위한 설정이 추가되었습니다.
    • 개발 및 테스트 환경을 위한 별도의 설정이 구성되었습니다.
  • 개선

    • 도메인 모델 구조가 개선되었습니다.

@stoneTiger0912 stoneTiger0912 self-assigned this Feb 5, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Walkthrough

새로운 추상 기본 클래스 BaseEntity를 도메인 모델에 추가하고, Spring Boot 설정 파일(application.yml)을 메인 및 테스트 환경용으로 작성했습니다. 기존 properties에서 애플리케이션 이름 설정을 제거하고 YAML 형식으로 통합했습니다.

Changes

Cohort / File(s) Summary
도메인 모델 기초 구조
src/main/java/flipnote/group/domain/model/BaseEntity.java
새로운 추상 기본 클래스 추가. 도메인 엔티티의 기본 타입 역할을 수행합니다.
프로퍼티 파일 마이그레이션
src/main/resources/application.properties
spring.application.name=Group 설정 제거. YAML 형식으로의 이관을 의도한 것으로 보입니다.
Spring Boot 설정 파일
src/main/resources/application.yml, src/test/resources/application.yml
메인 및 테스트 환경용 YAML 설정 파일 추가. 데이터베이스(H2, 프로덕션 DB), Redis, AWS S3, 로깅, 이미지 기본값 등 전체 애플리케이션 설정을 포함합니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 설정의 정원에 새 기초를 심고,
프로퍼티는 YAML로 우아하게 변신했네요.
BaseEntity는 모든 엔티티의 부모 되고,
개발과 테스트 환경 모두 준비 완료! 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 패키지 구조 설정이라는 변경사항의 주요 내용을 정확하게 요약하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/create-package

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/main/resources/application.yml`:
- Around line 11-15: Change the default JPA hibernate ddl setting from update to
a safe default (e.g., jpa.hibernate.ddl-auto: validate or none) and remove any
hard-coded update in the main application.yml; instead allow environment
override via SPRING_JPA_HIBERNATE_DDL_AUTO so development can opt into update,
ensuring production uses validate/none by default. Locate the
jpa.hibernate.ddl-auto property in the configuration and replace its value
accordingly, and document/ensure environments set
SPRING_JPA_HIBERNATE_DDL_AUTO=update only for dev.
🧹 Nitpick comments (1)
src/main/java/flipnote/group/domain/model/BaseEntity.java (1)

1-4: 엔티티를 확장할 때 @MappedSuperclass 적용 필요

현재 비어있는 추상 클래스로 사용할 경우 문제없습니다. 다만 이 클래스를 상속받는 엔티티가 생기고 공통 ID/감사 필드 등을 추가할 때는 @MappedSuperclass 어노테이션을 적용해야 JPA가 올바르게 처리합니다. Spring Boot 4.0.1은 Jakarta EE를 사용하므로 jakarta.persistence.MappedSuperclass를 임포트하면 됩니다.

Comment on lines +11 to +15
jpa:
open-in-view: false
hibernate:
ddl-auto: update

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Spring Boot spring.jpa.hibernate.ddl-auto production environment recommended value 2025

💡 Result:

For a production Spring Boot app, the recommended approach is to disable Hibernate’s automatic schema changes and manage schema evolution with migration tools (Flyway/Liquibase).

Recommended value (most common for prod):

  • spring.jpa.hibernate.ddl-auto=none — Hibernate performs no schema generation/updates; Spring Boot also defaults to none for non-embedded (“real”) databases unless you set it explicitly. [1]

Sometimes used in prod for safety checks:

  • spring.jpa.hibernate.ddl-auto=validate — verifies the schema matches your entities at startup, but does not modify the DB. [1]

Avoid in production:

  • update (and of course create / create-drop) — Hibernate explicitly notes update is not suitable for production; use schema migration tools instead. [2]

Sources: Spring Boot reference docs on ddl-auto values/defaults [1]; Hibernate best practices on schema management [2].


운영 환경에서 ddl-auto: update는 위험 — 환경변수로 분리 필수

운영 환경의 update 설정은 의도치 않은 스키마 변경을 야기할 수 있습니다. 기본값을 validate(또는 none)로 설정하고, 개발 환경에서만 update로 오버라이드하는 구성으로 변경하세요.

권장 변경
   jpa:
     open-in-view: false
     hibernate:
-      ddl-auto: update
+      ddl-auto: ${SPRING_JPA_HIBERNATE_DDL_AUTO:validate}

개발 환경에서는 SPRING_JPA_HIBERNATE_DDL_AUTO=update로 설정하면 됩니다.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
jpa:
open-in-view: false
hibernate:
ddl-auto: update
jpa:
open-in-view: false
hibernate:
ddl-auto: ${SPRING_JPA_HIBERNATE_DDL_AUTO:validate}
🤖 Prompt for AI Agents
In `@src/main/resources/application.yml` around lines 11 - 15, Change the default
JPA hibernate ddl setting from update to a safe default (e.g.,
jpa.hibernate.ddl-auto: validate or none) and remove any hard-coded update in
the main application.yml; instead allow environment override via
SPRING_JPA_HIBERNATE_DDL_AUTO so development can opt into update, ensuring
production uses validate/none by default. Locate the jpa.hibernate.ddl-auto
property in the configuration and replace its value accordingly, and
document/ensure environments set SPRING_JPA_HIBERNATE_DDL_AUTO=update only for
dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant