我是靠谱客的博主 甜美乌龟,这篇文章主要介绍nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 61,现在分享给大家,希望可以做个参考。
初学spring,开启注释扫描时就报这个错误,网上寻找一番大概是JDK和Spring版本不对应。开始我是用spring5.0.0版本不行,然后5.2.0版本还是不行。
然后在spring项目中找到了对应的版本,JDK17要用5.3.0以上的了
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Versions
这是spring的下载地址https://mvnrepository.com/artifact/org.springframework/spring-beans
导入idea时的要用的依赖
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.18</version>
</dependency>
<!--https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.18</version>
</dependency>
<!--https://mvnrepository.com/artifact/org.springframework/spring-beans -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.3.18</version>
</dependency>
最后
以上就是甜美乌龟最近收集整理的关于nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 61的全部内容,更多相关nested内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复