alibaba / Sentinel

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
https://sentinelguard.io/
Apache License 2.0
22.41k stars 8.03k forks source link

如何在springcloud3中开启openfeign对sentinel的支持 #3319

Open ALI1416 opened 9 months ago

ALI1416 commented 9 months ago

如何在springcloud3中开启openfeign对sentinel的支持

springcloud 2.x的配置

feign:
  sentinel:
  enabled: true
IsUnderAchiever commented 7 months ago

我也遇到了这个问题,springboot3.0.2、spring cloud2022.0.0-RC2、spring cloud alibaba2022.0.0.0-RC2开启这个配置之后启动就报错Error creating bean with name 'feignSentinelBuilder' defined in class path resource [com/alibaba/cloud/sentinel/feign/SentinelFeignAutoConfiguration.class]: Post-processing of merged bean definition failed

java.lang.ClassNotFoundException: org.springframework.cloud.openfeign.FeignClientFactory

导入了spring-cloud-starter-openfeign 、 spring-cloud-starter-alibaba-sentinel、spring-cloud-starter-alibaba-nacos-discovery、spring-cloud-loadbalancer的依赖

robberphex commented 7 months ago

有示例工程么?