SpringCloud 配置 feign.hystrix.enabled: true 不生效的原因

feign.hystrix.enabled: true 是老版本的配置, 新版的配置是

feign:
  circuitbreaker:
    enabled: true

同时还需要引入 hystrix 依赖

 <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
    <version>2.2.9.RELEASE</version>
 </dependency>

测试效果

image

posted @ 2022-08-03 18:50  博麗靈夢  阅读(381)  评论(0编辑  收藏  举报