### web
server:
  port: ${liquidnet.info.port}
  servlet:
     context-path: ${liquidnet.info.context}

management:
  server:
    servlet:
       context-path: /actuator
  health:
    mail:
      enabled: false


spring:
  application:
    name: ${liquidnet.info.name}
  ### actuator
  profiles:
    include: common-client #这里加载management相关公共配置
### resources
  ### xxl-job, datasource
  datasource:
    url: jdbc:mysql://${liquidnet.mysql.urlHostAndPort}/${liquidnet.mysql.database-name}?serverTimezone=UTC&characterEncoding=utf-8&useSSL=false
    username: ${liquidnet.mysql.username}
    password: ${liquidnet.mysql.password}
    driverClassName: com.mysql.cj.jdbc.Driver
    ### datasource-pool
    hikari:
      auto-commit: true
      connection-test-query: SELECT 1
      connection-timeout: 10000
      idle-timeout: 30000
      max-lifetime: 900000
      maximum-pool-size: 30
      minimum-idle: 10
      pool-name: HikariCP
      validation-timeout: 1000
    type: com.zaxxer.hikari.HikariDataSource
  mvc:
    servlet:
      load-on-startup: 0
    static-path-pattern: /static/**
  resources:
    static-locations: classpath:/static/
### freemarker
  freemarker:
    charset: UTF-8
    request-context-attribute: request
    settings:
      number_format: 0.##########
    suffix: .ftl
    templateLoaderPath: classpath:/templates/
## xxl-job, email
  mail:
    host: smtp.gmail.com
    password: gdczsltecflrhyjn
    port: 587
    username: liquidnet@zhengzai.tv
    from: liquidnet@zhengzai.tv
    properties:
      mail:
        smtp:
          auth: true
          socketFactory:
            class: javax.net.ssl.SSLSocketFactory
          starttls:
            enable: true
            required: true


# Eureka
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}}


### mybatis
mybatis:
  mapperLocations: classpath:/mybatis-mapper/*Mapper.xml
#mybatis.type-aliases-package=com.xxl.job.admin.core.model

### xxl-job, access token
xxl:
  job:
    accessToken: qk52rqSejRBm9enf6BTTxw==
    ### xxl-job, i18n (default is zh_CN, and you can choose "zh_CN", "zh_TC" and "en")
    i18n: zh_CN
    ## xxl-job, triggerpool max size
    triggerpool:
      fast:
        max: 200
      slow:
        max: 100
    ### xxl-job, log retention days
    logretentiondays: 30

### log
logging:
  file:
    max-size: 200MB
    name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}.log
  level:
    root: info
    com:
      liquidnet: info
  pattern:
    console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
    file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{36}:%line] - %msg%n'
    rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
