Springboot启动报错:类文件具有错误的版本61.0,应为 52.0
类文件具有错误的版本 61.0, 应为 55.0请删除该文件或确保该文件位于正确的类路径子目录中
·
java: 无法访问org.springframework.beans.factory.annotation.Autowired
错误的类文件: /D:/develop/apache-maven-3.6.1/mvn _resp/org/springframework/spring-beans/6.0.12/spring-beans-6.0.12.jar!/org/springframework/beans/factory/annotation/Autowired.class
类文件具有错误的版本 61.0, 应为 55.0
请删除该文件或确保该文件位于正确的类路径子目录中。

报错原因:spring版本和jdk版本不匹配。
SpringBoot使用了3.0或者3.0以上,因为Spring官方发布从Spring6以及SprinBoot3.0开始最低支持JDK17,所以仅需将SpringBoot版本降低为3.0以下。
解决方案:
将SpringBoot版本降低为3.0以下 版本随意,刷新Maven重启即可

更多推荐



所有评论(0)