diff --git a/spring-migration/src/main/resources/application.yml b/spring-migration/src/main/resources/application.yml new file mode 100644 index 0000000..1f5166a --- /dev/null +++ b/spring-migration/src/main/resources/application.yml @@ -0,0 +1,75 @@ +# Spring Boot Application Configuration +# Spring Boot 전환 후 application.properties → application.yml 변환 예시 + +spring: + application: + name: spring-migration-sample + + # H2 Database Configuration (Development) + datasource: + url: jdbc:h2:mem:sampledb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + driver-class-name: org.h2.Driver + username: sa + password: + + # JPA/Hibernate Configuration + jpa: + hibernate: + ddl-auto: create-drop + show-sql: true + properties: + hibernate: + format_sql: true + dialect: org.hibernate.dialect.H2Dialect + + # H2 Console (Development only) + h2: + console: + enabled: true + path: /h2-console + +# Server Configuration +server: + port: 8080 + servlet: + context-path: / + +# Actuator Configuration +management: + endpoints: + web: + exposure: + include: health,info,metrics + endpoint: + health: + show-details: when_authorized + +# Logging Configuration +logging: + level: + root: INFO + com.example.migration: DEBUG + org.springframework.web: DEBUG + org.hibernate.SQL: DEBUG + +--- +# Production Profile +spring: + config: + activate: + on-profile: prod + datasource: + url: jdbc:h2:file:./data/sampledb;DB_CLOSE_DELAY=-1 + username: ${DB_USERNAME:sa} + password: ${DB_PASSWORD:} + jpa: + hdl-auto: validate + show-sql: false + h2: + console: + enabled: false + +logging: + level: + root: WARN + com.example.migration: INFO