maven项目执行了很多次,突然就install失败了,抛出异常信息:
org/springframework/boot/maven/repackagemojo has been compiled by a more recent version of the java Runtime(class file version 61.0),this of the Java Runtime only recognizes class file vesions up to 52.0

解决方案
指定version即可
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.5.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
文章描述了一次Maven项目安装过程中遇到的异常,原因是使用的JavaRuntime版本较新,不支持更高的classfile版本。解决方法是更新SpringBootMaven插件至特定版本(如2.3.5.RELEASE)。
1259






