diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..0466f56 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,95 @@ +# Spring Boot 3.2.5 Configuration - 카드 매입 승인 경로 + +spring: + application: + name: card-acquisition-approval + + # Jakarta EE 9+ DataSource (jakarta.*) + datasource: + url: jdbc:h2:mem:acquirex;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + driver-class-name: org.h2.Driver + username: sa + password: + hikari: + maximum-pool-size: 10 + minimum-idle: 5 + connection-timeout: 30000 + + # JPA 3.1 (Hibernate 6.x) + jpa: + hibernate: + ddl-auto: update + show-sql: true + properties: + hibernate: + format_sql: true + dialect: org.hibernate.dialect.H2Dialect + jdbc: + time_zone: Asia/Seoul + + # H2 Console + h2: + console: + enabled: true + path: /h2-console + + # Jackson JSON + jackson: + serialization: + write-dates-as-timestamps: false + deserialization: + fail-on-unknown-properties: false + default-property-inclusion: non_null + +server: + port: 8080 + servlet: + context-path: / + error: + include-message: always + include-binding-errors: always + +management: + endpoints: + web: + exposure: + include: health,info,metrics + endpoint: + health: + show-details: when_authorized + +logging: + level: + root: INFO + com.acquirex: DEBUG + org.springframework.web: INFO + org.hibernate.SQL: DEBUG + pattern: + console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" + +--- +# Production Profile +spring: + config: + activate: + on-profile: prod + datasource: + url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:acquirex} + driver-class-name: org.postgresql.Driver + username: ${DB_USERNAME} + password: ${DB_PASSWORD} + jpa: + hibernate: + ddl-auto: validate + properties: + hibernate: + dialect: org.hibernate.dialect.PostgreSQLDialect + h2: + console: + enabled: false + +logging: + level: + root: WARN + com.acquirex: INFO + org.hibernate.SQL: WARN \ No newline at end of file