spring:
  application:
    name: ${SPRING_APPLICATION_NAME:xisc-zb-sunh}
  datasource:
    url: ${SPRING_DATASOURCE_URL:jdbc:oracle:thin:@172.18.15.50:1521:momdev}
    username: ${SPRING_DATASOURCE_USERNAME:xisc_pm}
    password: ${SPRING_DATASOURCE_PASSWORD:HZERO1234}
    hikari:
      # 连接池最小空闲连接数
      minimum-idle: ${SPRING_DATASOURCE_MINIMUM_IDLE:20}
      # 连接池允许的最大连接数
      maximum-pool-size: ${SPRING_DATASOURCE_MAXIMUM_POOL_SIZE:200}
      # 等待连接池分配连接的最大时长（毫秒）
      connection-timeout: ${SPRING_DATASOURCE_CONNECTION_TIMEOUT:30000}

  redis:
    host: ${SPRING_REDIS_HOST:172.18.15.29}
    port: ${SPRING_REDIS_PORT:6379}
    database: ${SPRING_REDIS_DATABASE:6}
    password: ${SPRING_REDIS_PASSWORD:Hand#2024}
    jedis:
      pool:
        # 资源池中最大连接数
        # 默认8，-1表示无限制；可根据服务并发redis情况及服务端的支持上限调整
        max-active: ${SPRING_REDIS_POOL_MAX_ACTIVE:50}
        # 资源池运行最大空闲的连接数
        # 默认8，-1表示无限制；可根据服务并发redis情况及服务端的支持上限调整，一般建议和max-active保持一致，避免资源伸缩带来的开销
        max-idle: ${SPRING_REDIS_POOL_MAX_IDLE:50}
        # 当资源池连接用尽后，调用者的最大等待时间(单位为毫秒)
        # 默认 -1 表示永不超时，设置5秒
        max-wait: ${SPRING_REDIS_POOL_MAX_WAIT:5000}
  web:
    resources:
      # 资源缓存时间，单位秒
      cache:
        period: 3600
      chain:
        # 开启gzip压缩
        compressed: true
        # 启用缓存
        cache: true
  data:
    mongodb:
      #database: xisc_pm
      #host: 172.18.15.29
      #port: 27017
      #username: xisc_pm
      #password: xiscpmmes
      uri: ${SPRING_MONGODB_URI:mongodb://xisc_pm:xiscpmmes@172.18.15.29:27017/xisc_pm}
server:
  undertow:
    threads:
      # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接
      # 默认值为8，建议设置每个CPU核心一个线程
      io: ${SERVER_UNDERTOW_IO_THREADS:4}
      # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程
      # 默认等于 io-threads*8，它的值设置取决于系统的负载，可适当调大该值
      worker: ${SERVER_UNDERTOW_WORKER_THREADS:128}
    # 每块buffer的空间大小，越小空间被利用越充分
    # 不要设置太大，以免影响其他应用，合适即可
    buffer-size: ${SERVER_UNDERTOW_BUFFER_SIZE:1024}
    # 是否分配的直接内存(NIO直接分配的堆外内存)。默认false
    direct-buffers: true
    # HTTP POST请求最大的大小。默认0，无限制，可设置10M
    max-http-post-size: 10485760
feign:
  circuitbreaker:
    # 启用断路器
    enabled: ${FEIGN_CIRCUITBREAKER_ENABLED:true}
  # 请求压缩配置
  compression:
    request:
      # 配置请求GZIP压缩
      enabled: ${FEIGN_COMPRESSION_REQUEST_ENABLED:true}
      # 配置压缩数据大小的下限
      min-request-size: ${FEIGN_COMPRESSION_REQUEST_MIN_REQUEST_SIZE:2048}
  # Feign客户端配置
  client:
    config:
      # Feign客户端默认配置
      default:
        # 连接超时
        connectTimeout: ${FEIGN_CLIENT_CONFIG_DEFAULT_CONNECT_TIMEOUT:2000}
        # 读取超时
        readTimeout: ${FEIGN_CLIENT_CONFIG_DEFAULT_READ_TIMEOUT:5000}
        # Feign日志级别：NONE/BASIC/HEADERS/FULL
        loggerLevel: ${FEIGN_CLIENT_CONFIG_DEFAULT_LOGGER_LEVEL:FULL}
mybatis:
  mapperLocations: classpath*:/mapper/**/*.xml
  configuration: # 数据库下划线转驼峰配置
    mapUnderscoreToCamelCase: true
    jdbc-type-for-null: 'null'
    local-cache-scope: statement

hzero:
  service:
    current:
      name: ${HZERO_ROUTER_NAME:xisc-zb-sunh}
      path: ${HZERO_SERVICE_PATH:/zb-sunh/**}
      service-name: ${HZERO_SERVICE_NAME:xisc-zb-sunh}
  scheduler:
    auto-register: ${SCHEDULER_AUTO_REGISTER:true}
    executor-code: ${SCHEDULER_EXECUTOR_CODE:PM_EXECUTOR}
    upload-log: false

#seata 配置
seata:
  enabled: ${SEATA_ENABLED:false}
  # 名字随意取，但是要和下面的vgroup-mapping对应
  tx-service-group: xisc_tx_group
  service:
    vgroup-mapping:
      #  seata-server名字 对应server端euraka的application配置值
      xisc_tx_group: ${SEATA_SERVICE_NAME:xisc-seata-server}
  registry:
    type: eureka
    eureka:
      weight: 1
      service-url: ${EUREKA_DEFAULT_ZONE:http://mesdevreg.hnxg.com/eureka}


logging:
  level:
    org.springframework.cloud: info
    io.github.resilience4j: info
    com.netflix.discovery: warn
    org.hzero.boot.platform.lov: info
    org.apache.ibatis: ${LOG_LEVEL:info}
    io.choerodon: ${LOG_LEVEL:info}
    org.hzero: ${LOG_LEVEL:info}
    com.xisc: ${LOG_LEVEL:info}
    io.choerodon.mybatis.provider.special.AbstractProvider: off