openfeign整合sentinel原理
时间: 2023-09-25 07:09:11 浏览: 109
OpenFeign整合Sentinel的原理是通过引入Sentinel相关依赖包,并在配置文件中设置feign.sentinel.enabled=true来开启Feign与Sentinel的结合使用。在@FeignClient注解中增加fallback属性,该属性定义远程接口访问有问题时的容错处理逻辑的类。fallback定义的类需要实现@FeignClient定义的接口。这样,在远程接口访问出现问题时,会自动调用fallback类中定义的容错处理逻辑。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* *3* [强强联合:OpenFeign 整合 Sentinel](https://blog.csdn.net/BASK2312/article/details/128036578)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [spring cloud alibaba 学习(十二)openFeign整合Sentinel实现服务熔断](https://blog.csdn.net/RenshenLi/article/details/122830375)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文