Spring启动报错Attribute ‘proxyBeanMethods‘ in annotation……SpringBootApplication

今天突然想写个测试,但是添加完依赖后启动报错了,我的这个报错是因为依赖中spring-context依赖版本问题

原本写的5.1.9.RELEASE,然后启动失败,经测试,将版本直接去掉,让依赖自己匹配

建议:加依赖的时候记得尽量看版本对应关系,如果不确定就不要加版本号,或者去百度一下,如果是spring cloud则建议引入低版本spring-boot-starter-parent依赖去匹配。

 解决办法:

切换spring boot或cloud版本

<dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
            <version>2.3.2.RELEASE</version>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>org.springframework</groupId>-->
<!--            <artifactId>spring-context</artifactId>-->
<!我的springboot版本是2.3.2.RELEASE,去掉版本号5.1.9.RELEASE后启动成功-->
<!--            <version>5.1.9.RELEASE</version>-->
<!--        </dependency>-->
    </dependencies>

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值