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