#-----------------------------------------------------------------------
#   prod 설정 - 춘천
#-----------------------------------------------------------------------
spring:
  config:
    activate:
      on-profile: prod-ccn
  # //FIXME:: SSL 활성화시 코멘트 제거
  #  profiles:
  #    include:
  #      - https
  datasource:
    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
        pool-name: xit-maria-pool
  
  devtools:
    livereload:
      enabled: false

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

logging:
  level:
    root: debug
    org.apache.http: warn
    io.netty: warn
    reactor.netty: WARN
    # webclient logging
    reactor.netty.http.client: warn
    #org.springframework.web.reactive.function.client.ExchangeFunctions: TRACE
    org.springframework: warn
    org.hibernate.validator.internal: 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:18090/${server.servlet.context-path:}/'
  # Spring Security cors 설정 :: CorsConfiguration 설정 값
  cors:
    allowed-origins: http://localhost, http://${app.api-ip}, http://localhost:8082, http://${app.api-ip}:8082, https://noparking.chuncheon.go.kr

  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
    # MDC logging trace 활성
    mdc:
      enabled: true

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

  contract:
    # milisecond
    connection:
      timeout: 600000
      readTimeout: 600000
    kakao:
      bulk-max-cnt: 100
      #    token: dd394da7f66211eb9cbe46e139ceffc2
      #    uuid: CON-41ef0535f67211ebbdedd2e6ed332381
      api:
        pay:
          host: https://docs-gw.kakaopay.com
          send: /v1/documents;POST
          bulksend: /v1/documents/bulk;POST
          validToken: /v1/{document_binder_uuid}/tokens/{tokens};GET
          modifyStatus: /v1/documents/{document_binder_uuid};POST
          bulkstatus: /v1/documents/bulk/status;POST
          findStatus: /v1/documents/{document_binder_uuid}/status;GET
        talk:
          host: https://edoc-gw.kakao.com
          send: /v1/envelopes/{PRODUCT_CODE};POST
          bulksend: /v1/bulk/envelopes/{PRODUCT_CODE};POST
          validToken: /v1/envelopes/{ENVELOPE_ID}/tokens/{TOKEN}/verify;GET
          modifyStatus: /v1/envelopes/{ENVELOPE_ID}/read;POST
          bulkstatus: /v1/envelopes/status;POST
    nice:
      host: https://svc.niceapi.co.kr:22001
      #    signgu-code: 11000
      #    ffnlg-code: 11
      #    client-id: 6c3eb1ff-530d-458a-9a6e-e02e3346f679
      #    client-secret: 960f204ec45bb312b7ad2d6b54b984d9c353b8
      #    product-id: 2101466024
      api:
        generate-token: /digital/niceid/oauth/oauth/token
        revoke-token: /digital/niceid/oauth/oauth/token/revokeById
        publickey: /digital/niceid/api/v1.0/common/crypto/publickey
        symmetrickey: /digital/niceid/api/v1.0/common/crypto/symmetrickey
        ci: /digital/niceid/cert/v1.0/ipin/addinfo/ci