Hystrix 超时

Hystrix 的超时时间默认为1秒,可能出现com.netflix.hystrix.exception.HystrixRuntimeException错误
配置Hystrix 的超时时间,在application.yml中添加:

hystrix:
  command:
    default:  #default全局有效,service id指定应用有效
      execution:
        timeout:
          enabled: true
        isolation:
          thread:
            timeoutInMilliseconds: 10000 #调整为10秒 

你可能感兴趣的:(hystrix)