Feign整合Sentinel 開啟 feign.sentinel.enabled=true 啟動報錯 Requested bean is currently in creation: Is there an unresolvable circular reference?
Spring Boot 版本為:2.3.9.RELEASE
Spring Cloud版本為:Hoxton.SR10
Spring Cloud Alibaba版本為:2.2.5.RELEASE
報錯資訊:
修改Spring Cloud 版本為Hoxton.SR8 啟動成功
熔斷回撥寫法:
@FeignClient(value = "user-service",fallbackFactory = UserClientFallbackFactory.class)
public interface UserClient {
@GetMapping("/user/getUserInfoById/{id}")
User getUserInfoById(@PathVariable Integer id);
啟動項配置
熔斷生效:
本作品採用《CC 協議》,轉載必須註明作者和本文連結