#-----------------------------------------------------------------------
#   local 설정
#-----------------------------------------------------------------------
# https 활성화시 comment 해제
#server:
#  port: 9443
#  http: 8082

spring:
  config:
    activate:
      on-profile: local-can
  #  profiles:
  #    include:
  #      - https
  datasource:
    # =============== p6spy ===============================
    #driver-class-name: org.mariadb.jdbc.Driver
    #url: jdbc:mariadb://211.119.124.9:4407/ens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true
    # root / xit1807
    hikari:
      # 9 server
      primary:
        database: oracle
        driver-class-name: oracle.jdbc.OracleDriver
        jdbc-url: jdbc:oracle:thin:@211.119.124.117:1521:ora11g
        username: xit_traffic
        password: traffic5
        pool-name: xit-oracle-pool

      # multi-database
      #secondary:

      # 115 server
      # jdbc:oracle:thin:@211.119.124.115:1521:XITSMS
      # xit_sms_lg / xit_sms_lg
  #      secondary:
  #        driver-class-name: oracle.jdbc.OracleDriver
  #        jdbc-url: jdbc:oracle:thin:@211.119.124.115:1521:XITSMS
  #        username: xit_sms_lg
  #        password: xit_sms_lg
  #        read-only: false

  devtools:
    livereload:
      enabled: true

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

logging:
  level:
    root: debug
    org.apache.http: warn
    reactor.netty: warn
    io.netty: warn
    org.springframework.web.reactive.function.client.ExchangeFunctions: debug
    org.springframework: warn

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

app:
  api-ip: 211.119.124.73
  # 강제로 swagger-url을 지정해야 하는 경우만 선언
  #swagger-url: 'http://localhost:${server.port}${server.servlet.context-path:}/'
  # Spring Security cors 설정 :: CorsConfiguration 설정 값
  cors:
    allowed-origins: http://localhost:18090, https://localhost:8443
  #    allowed-origins: http://localhost:18090, https://localhost:8443, http://localhost:8082, https://localhost:9443
  data:
    root:
      path: ${user.home}/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: true
    # MDC logging trace 활성
    mdc:
      enabled: false

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