server:
  port: ${liquidnet.info.port}
  tomcat:
    uri-encoding: UTF-8
  servlet:
    context-path: ${liquidnet.info.context}
# -----------------------------------------------------------
knife4j:
  production: ${liquidnet.knife4j.disable}
  basic:
    enable: true
    username: ${liquidnet.security.username}
    password: ${liquidnet.security.password}
# -----------------------------------------------------------
logging:
  file:
    name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
    max-size: 200MB
  pattern:
    file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
    console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
    rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
  level:
    root: info
    #以下是为指定包设置日志级别
#    com:
#      liquidnet: info
# -----------------------------------------------------------
eureka:
#  client:
#    register-with-eureka: true
#    fetch-registry: true
#    serviceUrl:
#      defaultZone: http://${liquidnet.security.username}:${liquidnet.security.password}@${liquidnet.eureka.host}/eureka-server/eureka
  instance:
    hostname: ${spring.cloud.client.ip-address}
    lease-expiration-duration-in-seconds: 15 #服务过期时间配置,超过这个时间没有接收到心跳EurekaServer就会将这个实例剔除
    lease-renewal-interval-in-seconds: 5 #服务刷新时间配置，每隔这个时间会主动心跳一次
    prefer-ip-address: true
    instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${spring.application.instance_id:${server.port}}
# -----------------------------------------------------------
#actuator/info
info:
  app:
    name: ${liquidnet.info.name}
  company:
    name: lightnet.io
  build:
    groupId: '@project.groupId@'
    artifactId: '@project.artifactId@'
    version: '@project.version@'
# -----------------------------------------------------------
pagehelper:
  helperDialect: mysql
  reasonable: true
  supportMethodsArguments: true
  params: count=countSql
# -----------------------------------------------------------
xxl:
  job:
    admin:
      addresses: http://127.0.0.1:8090/
    accessToken:
    executor:
      appname: liquidnetTaskService
      address:
      ip:
      port: 9102
      logpath: /data/applogs/xxl-job/jobhandler
      logretentiondays: 3
# -----------------------------------------------------------
spring:
  application:
    name: ${liquidnet.info.name}
  autoconfigure:
    exclude: org.springframework.cloud.bus.BusAutoConfiguration, org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration, org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration, org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration
  cloud:
    refresh:
      extra-refreshable: none
  rabbitmq:
    addresses: ${liquidnet.rabbitmq.host}
    port: ${liquidnet.rabbitmq.port}
    username: ${liquidnet.rabbitmq.username}
    password: ${liquidnet.rabbitmq.password}
  shardingsphere:
    props:
      sql:
        show: false
        simple: true
    datasource:
      names: db0
      db0:
        type: org.apache.commons.dbcp2.BasicDataSource
#        driver-class-name: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://${liquidnet.mysql.urlHostAndPort}/${liquidnet.mysql.database-name}?serverTimezone=UTC&zeroDateTimeBehavior=convertToNull&characterEncoding=utf-8&useSSL=false&autoReconnect=true
        username: ${liquidnet.mysql.username}
        password: ${liquidnet.mysql.password}
        initialSize: 10
        maxTotal: 50
        maxIdle: 10
#        minIdle: 0
        timeBetweenEvictionRunsMillis: 6000
        validationQuery: select 1
        testWhileIdle: true
        testOnBorrow: false
        poolPreparedStatements: true
        maxOpenPreparedStatements: 100
    sharding:
      tables:
        FIN_AC_N02:
          actualDataNodes: db${0}.FIN_AC_N02_${0..24}
          logicTable: FIN_AC_N02
          tableStrategy:
            standard:
              sharding-column: FA1
              precise-algorithm-class-name: com.liquidnet.common.sharding.jdbc.algorithm.ModuloShardingTableAlgorithm
              range-algorithm-class-name: com.liquidnet.common.sharding.jdbc.algorithm.ModuloShardingTableAlgorithm
#            inline:
#              algorithmExpression: FIN_AC_N11_${FA1 % 25}
#              shardingColumn: fin_id

# -----------------------------------------------------------

# -----------------------------------------------------------
