server:
  port: ${liquidnet.info.port}
  tomcat:
    uri-encoding: UTF-8
  servlet:
    context-path: ${liquidnet.info.context}
# -----------------------------------------------------------
spring:
  application:
    name: ${liquidnet.info.name}
  profiles:
    include: common-service #这里加载management相关公共配置
  autoconfigure:
    exclude: org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration,org.springframework.cloud.bus.BusAutoConfiguration
#  cloud:
#    bus:
#      destination: springCloudBus.${liquidnet.info.name}.port${liquidnet.info.port}
#      trace:
#        enabled: true
  datasource:
    dynamic:
      primary: master #设置默认的数据源或者数据源组,默认值即为master
      strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
      datasource:
        master_1:
          #解决日期为0的转换  zeroDateTimeBehavior=CONVERT_TO_NULL
          url: jdbc:mysql://${liquidnet.mysql.main-db.urlHostAndPort}/${liquidnet.mysql.main-db.database-name}?zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC&characterEncoding=utf-8&useSSL=false
          username: ${liquidnet.mysql.main-db.username}
          password: ${liquidnet.mysql.main-db.password}
          driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
        acs_1:
          url: jdbc:mysql://${liquidnet.mysql.acs-db.urlHostAndPort}/${liquidnet.mysql.acs-db.database-name}?zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC&characterEncoding=utf-8&useSSL=false
          username: ${liquidnet.mysql.acs-db.username}
          password: ${liquidnet.mysql.acs-db.password}
          driver-class-name: com.mysql.cj.jdbc.Driver
        adam_1:
          url: jdbc:mysql://${liquidnet.mysql.adam-db.urlHostAndPort}/${liquidnet.mysql.adam-db.database-name}?zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC&characterEncoding=utf-8&useSSL=false
          username: ${liquidnet.mysql.adam-db.username}
          password: ${liquidnet.mysql.adam-db.password}
          driver-class-name: com.mysql.cj.jdbc.Driver
          #          url: ENC(xxxxx) # 内置加密,使用请查看详细文档
          #          username: ENC(xxxxx)
          #          password: ENC(xxxxx)

#  rabbitmq:
#    addresses: ${liquidnet.rabbitmq.host}
#    port: ${liquidnet.rabbitmq.port}
#    username: ${liquidnet.rabbitmq.username}
#    password: ${liquidnet.rabbitmq.password}
#  redis:
#    port: ${liquidnet.redis.port}
#    host: ${liquidnet.redis.host}
#    lettuce:
#      pool:
#        max-active: 16
#        max-wait: -1
#        max-idle: 8
#        min-idle: 4
#    password: ${liquidnet.redis.password}
  mvc:
    static-path-pattern: /templates/**
    # 定位模板的目录
    view:
      prefix: classpath:/templates/
      suffix: .html
  resources:
    static-locations: classpath:/templates/,classpath:/static/page
# -----------------------------------------------------------
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
    max-history: ${liquidnet.logfile.max-history}
  pattern:
    file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{56}:%line] - %msg%n'
    console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{56}:%line] - %msg%n'
    rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
  level:
    root: error
    #以下是为指定包设置日志级别
    com.liquidnet.service.feign: error
    com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
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}}
    metadata-map:
      configPath: ${server.servlet.context-path}
# -----------------------------------------------------------
#actuator/info
info:
  app:
    name: ${liquidnet.info.name}
  company:
    name: zhengzai.tv
  build:
    groupId: '@project.groupId@'
    artifactId: '@project.artifactId@'
    version: '@project.version@'
# -----------------------------------------------------------

mybatis-plus:
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl