Unsupported class file major version 57
今天学习SpringBoot,在启动引导类的时候报错了,然后就蒙蔽了,最后查了一下,version57指的的jdk13,没错我用的就是jdk13,有两种方法可以解决这个问题
方式一:
在pom.xml中加入下面的代码:
<!--设置maven的编译版本为1.8-->
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
如果还是报错就clean install以下
方式二
那当然是更换jdk版本重新创建项目了