今天练习的时候遇到了这个问题:先是报错:“无效的标识:--release,改了setting和Project Structure 也不行,报错信息又变成了“org/springframework/boot/maven/RepackageMojo has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
最后发现是pom.xml文件中的version设置的太高了,由最初的3.1.1换成2.7.11,就成功了。
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.11</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
附上运行成功的图片~