java..类文件具有错误的版本 61.0, 应为 55.0 请删除该文件或确保该文件位于正确的类路径子目录中。
•
Jave

第一步先打开pom.xml配置文件,找到版本号那几行,这里需要更改版本号。
4.0.0
org.springframework.boot
spring-boot-starter-parent
3.1.0
com.example
springboot-mybatis-quickstart
0.0.1-SNAPSHOT
springboot-mybatis-quickstart
springboot-mybatis-quickstart
11
org.mybatis.spring.boot
mybatis-spring-boot-starter
3.0.2
com.mysql
mysql-connector-j
runtime
<!--上一个驱动包
mysql
mysql-connector-java
runtime
-->
org.springframework.boot
spring-boot-starter-test
test
org.springframework.boot
spring-boot-maven-plugin
报错原因:spring版本和jdk版本不匹配。
解决方案 :将版本切换为2.7.12和2.1.3
注意:在这里JDK版本号为11 !!!


注意:更换完版本好后必须点击刷新项目,停止运行并重新运行,否则可能依然报错,项目还是按照之前的错误信息运行。
以上方案仅供参考,不是唯一方案与唯一版本号,情况不一。
本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/e8ce9ce22a.html
