开发者社区 > 云原生 > 正文

Sentinel 整合 openFeign 启动报错问题(Sentinel integration

在aop中调用了feign 启动报错内容如下(Called feign in aop and started with the following error) Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-10-01 09:55:27.230 ERROR 29032 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginAdvice': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.btks.service.feign.LoginLogApiService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalAccessError: tried to access class org.springframework.cloud.openfeign.FeignClientFactoryBean from class com.alibaba.cloud.sentinel.feign.SentinelFeign$Builder$1

预期应该正常启动,因为把Sentinel关闭可以正常启动(It is expected that it should start normally, because turning Sentinel off will start normally)

feign: sentinel: enabled: false

环境版本

spring clould Aalibaba 2021.1 spring boot 2.3.0.RELEASE spring clould Hoxton.SR5

原提问者GitHub用户cheng-qiang

展开
收起
学习娃 2023-05-19 14:21:56 180 0
1 条回答
写回答
取消 提交回答
  • 版本原因: spring clould Hoxton.SR5 升级为Hoxton.SR9 spring clould Aalibaba 2021.1 降级为2.2.1.RELEASE 已解决!

    原回答者GitHub用户cheng-qiang

    2023-05-19 20:01:37
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
阿里云容器 AHAS Sentinel 网关流控揭秘 立即下载
workshop专场-微服务专场-开发者动手实践营-微服务-使用Sentinel进行微服务流量控制 立即下载
Sentinel分布式系统下的流量防卫兵 立即下载