spring:
  application:
    name: wbx-spring-core

  jpa:
    hibernate:
      ddl-auto: update
    open-in-view: false
    database-platform: org.hibernate.dialect.MySQLDialect
    properties:
      hibernate:
        default_batch_fetch_size: 100
        format_sql: true
        dialect: org.hibernate.dialect.MySQLDialect

  flyway:
    enabled: false  # 개발 시 hibernate ddl-auto 사용, 프로덕션 시 true

  datasource:
    url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wbx_spring}?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Seoul
    username: ${DB_USER:accura}
    password: ${DB_PASS:ubuilder0117}
    driver-class-name: com.mysql.cj.jdbc.Driver
    hikari:
      maximum-pool-size: 20
      minimum-idle: 5
      connection-timeout: 30000

  data:
    redis:
      host: localhost
      port: 6379

server:
  port: 8080
  forward-headers-strategy: native
  servlet:
    context-path: ${SERVER_CONTEXT_PATH:/spring}  # 독립 도메인 시 '/' 또는 제거

# WBX Spring Framework
wbx:
  spring:
    api-prefix: /api
    jwt:
      secret: ${JWT_SECRET:wbx-spring-dev-secret-key-change-in-production-minimum-256-bits-long}
      expiration: 28800
    cors:
      allowed-origins: ${CORS_ORIGINS:http://localhost:5173,http://localhost:3000,http://localhost:8080}
    notification:
      sse-enabled: true
      heartbeat-seconds: 30

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics
  endpoint:
    health:
      show-details: when-authorized

springdoc:
  api-docs:
    path: /api-docs
  swagger-ui:
    path: /swagger-ui
  packages-to-scan: kr.co.accura.wbx.spring

spring.mvc.problemdetail.enabled: false
