#-----------------------------------------------------------------------
#   prod 설정 - 춘천
#-----------------------------------------------------------------------
server:
  port: 8082

spring:
  config:
    activate:
      on-profile: prod-ccn
  # //FIXME:: SSL 활성화시 코멘트 제거
  #  profiles:
  #    include:
  #      - https
  datasource:
    #username: root
    #password: xit1807
    hikari:
      # 9 server
      primary:
        database: mysql
        driver-class-name: org.mariadb.jdbc.Driver
        # jdbc:mariadb://127.0.0.1:4407/mens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true
        jdbc-url: jdbc:mariadb://152.99.141.24:60001/xplatform?rewriteBatchedStatements=true&profileSQL=true&logger=Slf4JLogger&maxQuerySizeToLog=999999
        username: root
        password: xit5811807
        read-only: false

      # multi-database
      #secondary:

  devtools:
    livereload:
      enabled: false

springdoc:
  api-docs:
    enabled: true
  swagger-ui:
    enabled: true

logging:
  level:
    root: warn
    org.apache.http: warn
    reactor.netty: warn
    io.netty: warn
    org.springframework.web.reactive.function.client.ExchangeFunctions: warn
    org.springframework: warn
  file:
    # 로그파일 위치
    path: ${app.data.root.path}/mens/logs
    name: ${app.name}

# ==================================================================================================================
# SQL logging lib setting
# ==================================================================================================================
decorator:
  datasource:
    p6spy:
      enable-logging: true

app:
  api-ip: 152.99.141.77
  # 강제로 swagger-url을 지정해야 하는 경우만 선언
  swagger-url: 'http://152.99.141.77:8082/${server.servlet.context-path:}/'
  # Spring Security cors 설정 :: CorsConfiguration 설정 값
  cors:
    allowed-origins: http://localhost, http://152.99.141.77
  data:
    root:
      path: /data

  #---------------------------------------------------------------
  # log 설정
  # request:
  #   custom-enabled | common-enabled | filter-enabled 중 1개만 활성화
  #   --> 운영: common-enabled, 개발: custom-enabled 사용 권장
  # response-enabled : 호출 결과 출력 - 운영시 false
  # mdc : api 호출(서비스) 로그 기록
  #   uris : api 호출 로그 제외 패턴
  #---------------------------------------------------------------
  log:
    request:
      custom-enabled: true
    response-enabled: false
    # MDC logging trace 활성
    mdc:
      enabled: true

  # slack
  slack-webhook:
    enabled: false
    url: https://hooks.slack.com/services/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
