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

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-ptis-server
  process-id: 70041
  cpu-limits: 75
  #scheduling: 0 4,9,14,19,24,29,34,39,44,49,54,59 * * * *
  err-time-gap: 120
  prcs-thread-count: 10
  dbms-batch-size: 1000

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

---
spring:
  config:
    activate:
      on-profile: dev
    import:
      - optional:file:${user.dir}/conf/utic-ptis-server-dev.yml
  datasource:
    hikari:
      driver-class-name: oracle.jdbc.OracleDriver
      jdbc-url: jdbc:oracle:thin:@115.91.94.42:1521:HANTE
      #      driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
      #      jdbc-url: jdbc:log4jdbc:oracle:thin:@115.91.94.42:1521:HANTE
      username: ptdbs
      password: ptdbs

---
spring:
  config:
    activate:
      on-profile: prod
    import:
      - optional:file:${user.dir}/conf/utic-ptis-server-prod.yml
  datasource:
    hikari:
      driver-class-name: oracle.jdbc.OracleDriver
      jdbc-url: jdbc:oracle:thin:@192.169.1.4:1521:PTDBS
      username: ptdbs
      password: ptdbs
