server:
  port: ${liquidnet.info.port}
  tomcat:
    uri-encoding: UTF-8
    maxThreads: 3000 #默认200
    minSpareThreads: 3000 #默认10
    maxConnections: 20000 #默认10000
    acceptCount: 5000  #默认100
    processorCache: -1  #默认200
  servlet:
    context-path:
# -----------------------------------------------------------
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} [%level] %thread [%logger{36}:%line] - %msg%n'
    console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%level] %thread [%logger{36}:%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}
# -----------------------------------------------------------
spring:
  application:
    name: ${liquidnet.info.name}
  autoconfigure:
    exclude:
      - org.springframework.cloud.bus.BusAutoConfiguration
      - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
  profiles:
    include: common-service
#  redis:
#    port: ${liquidnet.redis.port}
#    host: ${liquidnet.redis.host}
#    password: ${liquidnet.redis.password}
# -----------------------------------------------------------
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}}
# -----------------------------------------------------------
zuul:
  sensitive-headers:
  prefix: /
  host:
    max-per-route-connections: 300 #默认 20
    max-total-connections: 12000 #默认 200
    connect-timeout-millis: 60000 #默认 2000
    socket-timeout-millis: 60000  #默认 10000
  routes:
    liquidnet-service-adam: /adam/**
    liquidnet-service-kylin: /kylin/**
  # 忽略的服务，有些后端服务是不需要让网管代理的，防止服务侵入
  ignored-services: "*"
  semaphore:
    max-semaphores: 10000 #默认 100
  # 忽略的接口，屏蔽接口
#  ignored-patterns: /**/div/**
# -----------------------------------------------------------
global-auth:
  exclude-url-pattern:
    - /**
# -----------------------------------------------------------
#解决错误 com.netflix.client.ClientException: Load balancer does not have available server for client:panfeng-item-service
#这样就可以即指定path与URL，又不破坏Zuul的Hystrix与Ribbon特性了。
#开启eureka负载均衡策略
ribbon:
  eureka:
    enabled: true   # 为Ribbon禁用Eureka
  ReadTimeout: 5000
  ConnectTimeout: 5000
  MaxAutoRetries: 0
  MaxAutoRetriesNextServer: 0
  MaxConnectionsPerHost: 10000
  MaxTotalConnections: 50000
#  MaxConnectionsPerHost: 5000
#  MaxTotalConnections: 25000
#liquidnet-service-sequence:
#  ribbon:
#    listOfServers: 192.168.137.1:9001
# -----------------------------------------------------------
hystrix:
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 60000
# -----------------------------------------------------------
