hystrix熔断器、仪表盘、健康检查功能使用文档,教程非常详细,傻瓜式操作

  • hystrix熔断器的使用
  • 添加依赖
  1. <dependency>  
  2.         <groupId>org.springframework.cloud</groupId>  
  3.         <artifactId>spring-cloud-starter-openfeign</artifactId>  
  4.     </dependency>  
  5.     <dependency>  
  6.         <groupId>org.springframework.cloud</groupId>  
  7.         <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>  
  8.  </dependency>  
  9. yml配置
  1. #设置Feign的配置  
  2. feign:  
  3.   hystrix:  
  4.     # 开启Hystrix,否则@FeignClient中的fallbackFactory配置不起作用。  
  5.     enabled: true  
  6.   
  7. #-----------------Hystrix配置-----------------------  
  8. hystrix:  
  9.   command:  
  10.     default:  
  11.       metrics:  
  12.         rollingStats:  
  13.           #设置滚动时间窗为5秒  
  14.           timeInMilliseconds: 5000  
  15.       execution:  
  16.         isolation:  
  17.           thread:  
  18.             # 设置命令执行的默认超时时间,单位毫秒  
  19.             timeoutInMilliseconds: 10000  
  20.         timeout:  
  21.           # 是否启用超时,如果不启用上面的值也不用配置。  
  22.           enabled: true  
  23.       circuitBreaker:  
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值