spring:
  profiles:
    active: prod
  config:
      import:
        - optional:file:${user.dir}/conf/utic-traf-server.yml
  application:
    name: utic-traf-server
  main:
#    web-application-type: none
    log-startup-info: true
    banner-mode: off
  output:
    ansi:
      enabled: always
  lifecycle:
    timeout-per-shutdown-phase: 5s
  datasource:
    hikari:
      utic:
        connection-test-query: SELECT 1 FROM DUAL
        validation-timeout: 2000
        driver-class-name: oracle.jdbc.OracleDriver
        minimum-idle: 10
        maximum-pool-size: 30
        max-lifetime: 900000       # 30분 (네트워크 장비 타임아웃보다 짧게)
        idle-timeout: 300000        # 10분 후 유휴 커넥션 제거
        connection-timeout: 5000   # 커넥션 획득 대기 시간 5초
      dwdb:
        connection-test-query: SELECT 1 FROM DUAL
        validation-timeout: 2000
        driver-class-name: oracle.jdbc.OracleDriver
        minimum-idle: 10
        maximum-pool-size: 30
        max-lifetime: 900000       # 30분 (네트워크 장비 타임아웃보다 짧게)
        idle-timeout: 300000        # 10분 후 유휴 커넥션 제거
        connection-timeout: 5000   # 커넥션 획득 대기 시간 5초
        keepalive-time: 300000
      moct:
        connection-test-query: SELECT 1 FROM DUAL
        validation-timeout: 2000
        driver-class-name: oracle.jdbc.OracleDriver
        minimum-idle: 1
        maximum-pool-size: 2
        max-lifetime: 900000       # N분 (네트워크 장비 타임아웃보다 짧게)
        idle-timeout: 300000        # N분 후 유휴 커넥션 제거
        connection-timeout: 5000   # 커넥션 획득 대기 시간 초
        keepalive-time: 300000

server:
  port: 9871
  shutdown: graceful
  tomcat:
    connection-timeout: 5000         # 연결 대기 시간 5초
    keep-alive-timeout: 0            # 응답 후 바로 연결 종료
    max-keep-alive-requests: 1       # 한 연결당 1회 요청만 허용
    threads:
      max: 5        # 톰캣 최대 스레드 수 설정
      min-spare: 2  # 초기 여유 스레드 수
    accesslog:
      enabled: false            # 액세스 로그 활성화 여부

management:
  endpoints:
    prometheus:
      enabled: true
    web:
      exposure:
        include: "*"
    health:
      show-details: "always"
  security:
    enabled: false

application:
  process-name: utic-traf-server
  process-id: 70030
  cpu-limits: 75
  loading-link: false
  err-time-gap: 120
  prcs-thread-count: 10
  dbms-batch-size: 2000
  traffic-center-hist: false

  thread-pool:
    dbms: 10
    work: 5

logging:
  file:
    path: ${user.dir}/logs/utic-traf-server/

---
spring:
  config:
    activate:
      on-profile: dev
  datasource:
    hikari:
      utic:
        jdbc-url: jdbc:oracle:thin:@115.91.94.42:1521:HANTE
        username: utiadmin
        password: utiadmin
      dwdb:
        jdbc-url: jdbc:oracle:thin:@115.91.94.42:1521:HANTE
        username: DWUSER
        password: DWUSER
      moct:
        jdbc-url: jdbc:oracle:thin:@115.91.94.42:1521:HANTE
        username: ptdbs
        password: ptdbs

---
spring:
  config:
    activate:
      on-profile: prod
  datasource:
    hikari:
      utic:
        jdbc-url: jdbc:oracle:thin:@(DESCRIPTION=(FAIL_OVER=ON)(LOAD_BALANCE=ON)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.21)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.22)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=UTIS)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRY=180)(DELAY=15))))
        username: utiadmin
        password: utiadmin
      dwdb:
        jdbc-url: jdbc:oracle:thin:@192.168.10.14:1521:DWDB
        username: DWUSER
        password: ROTADW1014
      moct:
        jdbc-url: jdbc:oracle:thin:@192.169.1.4:1521:PTDBS
        username: ptdbs
        password: ptdbs
