openfeign3.1.3版本@FeignClient fallback属性不生效

pom.xml 引入依赖

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
  
<groupId>org.springframework.cloud</groupId>   <artifactId>spring-cloud-starter-circuitbreaker-resilience4j</artifactId> </dependency>

application.yaml中加入配置

feign:
  circuitbreaker:
    enabled: true

 

posted @ 2022-09-26 11:09  水水君  阅读(291)  评论(0编辑  收藏  举报