# Spring 相关
spring:
  mvc:
    throw-exception-if-no-handler-found: true
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: GMT+8
  # zipkin
#  zipkin:
#    enabled: true
#    base-url: http://localhost:9411/
#  sleuth:
#    web:
#      client:
#        enabled: true
#    sampler:
#      # 默认的采样比率为0.1，不能看到所有请求数据
#      # 更改采样比率为1，就能看到所有的请求数据了，但是这样会增加接口调用延迟
#      probability: 0.5

# 暴露监控端点
management:
  endpoints:
    web:
      exposure:
        include: '*'

# feign 配置
feign:
  hystrix:
    enabled: true
  okhttp:
    enabled: true
  httpclient:
    enabled: false
  client:
    config:
      default:
        connectTimeout: 10000
        readTimeout: 10000
  compression:
    request:
      enabled: true
    response:
      enabled: true

# hystrix 配置
hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: true
        isolation:
          strategy: SEMAPHORE
          thread:
            timeoutInMilliseconds: 5000 #断路器超时时间，默认1000ms
    dataSqlConsoleHystrix: #sql工作台方法的超时时间 60s
      fallback:
        enabled: true
      execution:
        timeout:
          enabled: true
        isolation:
          thread:
            timeoutInMilliseconds: 60000 #断路器超时时间，默认1000ms
    dataApiMappingHystrix: #api调用方法的超时时间 60s
      fallback:
        enabled: true
      execution:
        timeout:
          enabled: true
        isolation:
          thread:
            timeoutInMilliseconds: 60000 #断路器超时时间，默认1000ms
  shareSecurityContext: true

#请求处理的超时时间
ribbon:
  ReadTimeout: 10000
  ConnectTimeout: 10000