spring cloud 集成sentinel 报错 Failed to introspect Class

在尝试集成SpringCloud和Sentinel时遇到了错误,报错信息为无法 introspect 类 TransactionAutoConfiguration。分析发现可能是版本不兼容。博主将Sentinel版本从2021.1降至2.1.1.RELEASE,同时调整了阿里巴巴版本至2.1.7,解决了报错问题。
摘要由CSDN通过智能技术生成

今天在 spring cloud 集成sentinel  的时候 发现报错

Failed to introspect Class [org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@4e0e2f2a] 

所有的sentinel版本如下:https://mvnrepository.com/artifact/com.alibaba.cloud/spring-cloud-starter-alibaba-sentinel

然后我这边看了下 我集成introspect 版本,

<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
    <version>2021.1</version>
</dependency>

我自己阿里巴巴版本

dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>Greenwich.SR3</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

点进去


发现是2.1.7

这个是原因版本太高了,不支持,所以换了如下版本:

 

<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
    <version>2.1.1.RELEASE</version>
</dependency>

改成此版本后刷新下 在运行就不报错了。

这是我遇到的一种情况 你们可以试下。

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值