huanghongfa
2020-12-29 60ba6abd93f8b80c99543fad618f4d62d801d31a
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/resources/bootstrap.yml
@@ -6,40 +6,16 @@
      discovery:
        enabled: true
        service-id: config  # 注册中心的服务名
      profile: dev  # 指定配置文件的环境
      profile: test  # 指定配置文件的环境
  profiles:
    active: dev
    active: test
eureka:
  client:
    service-url:
      defaultZone: http://localhost:8192/eureka/
hystrix:
  command:
    default:
      circuitBreaker:
        sleepWindowInMilliseconds: 100000 #短路多久以后开始尝试是否恢复,默认5s
        forceClosed: true #该属性如果为真,则迫使断路器进入闭合状态,其中它将允许请求,而不考虑误差百分比
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 60000 #服务降级超时时间
  shareSecurityContext: true # 这样将会自动配置一个 Hystrix 并发策略插件的 hook,这个hook会将 SecurityContext 从主线程传输到 Hystrix 的命令
### Ribbon 配置
ribbon:
  # http建立socket超时时间,毫秒
  ConnectTimeout: 6000
  # http读取响应socket超时时间
  ReadTimeout: 10000
  # 同一台实例最大重试次数,不包括首次调用
  MaxAutoRetries: 0
  # 重试负载均衡其他的实例最大重试次数,不包括首次server
  MaxAutoRetriesNextServer: 2
  # 是否所有操作都重试,POST请求注意多次提交错误。
  # 默认false,设定为false的话,只有get请求会重试
  OkToRetryOnAllOperations: true