springcloud之feign中使用Hystrix熔断器时的报错解决办法

<!--远程调用-->
<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>

 

feign的那个springboot项目里加了一个hystrix熔断器

由于Feign是自带断路器的,所以我们不需要加hystrix的依赖包

 添加如下设置,开启hystrix 配置

feign:
  hystrix:
    enabled: true

 

posted @ 2021-02-25 11:14  newlangwen  阅读(213)  评论(0编辑  收藏  举报