debug: false
management.endpoints.web.exposure.include: "*"

logging:
  level:
    com.example.board: debug
    org.springframework.web.servlet: debug
    org.hibernate.type.descriptor.sql.BasicBinder: trace

spring:
#  application:
#    name: board
#  cloud:
#    vault:
#      scheme: http
#      authentication: token
#      token: ${VAULT_TOKEN}
#  config:
#    import: vault://

  datasource:
    url: ${LOCAL_DB_URL}
    username: ${LOCAL_DB_USERNAME}
    password: ${LOCAL_DB_PASSWORD}
    driver-class-name: com.mysql.cj.jdbc.Driver
  jpa:
    open-in-view: false
    defer-datasource-initialization: true
    hibernate:
      ddl-auto: create
#    open-in-view: false
    show-sql: true
    properties:
      hibernate.format_sql: true
      hibernate.default_batch_fetch_size: 100
  #  h2.console.enabled: true
  sql.init.mode: always
  data:
    rest:
      base-path: /api
      detection-strategy: annotated
  thymeleaf3:
    decoupled-logic: true

  security:
    oauth2:
      client:
        registration:
          kakao:
            client-id: ${KAKAO_OAUTH_CLIENT_ID}
            client-secret: ${KAKAO_OAUTH_CLIENT_SECRET}
            authorization-grant-type: authorization_code
            redirect-uri: "{baseUrl}/login/oauth2/code/kakao"
            client-authentication-method: POST
        provider:
          kakao:
            authorization-uri: https://kauth.kakao.com/oauth/authorize
            token-uri: https://kauth.kakao.com/oauth/token
            user-info-uri: https://kapi.kakao.com/v2/user/me
            user-name-attribute: id

---

spring:
  config.activate.on-profile: test
  datasource:
    url: jdbc:h2:mem:board;mode=mysql
    driver-class-name: org.h2.Driver
  sql.init.mode: always
#  test.database.replace: none

---

spring:
  config.activate.on-profile: heroku
  datasource:
    url: ${JAWSDB_URL}
    driver-class-name: com.mysql.cj.jdbc.Driver
  jpa.hibernate.ddl-auto: create
  sql.init.mode: always