Fork me on GitHub

XXX has been compiled by a more recent version of the Java Runtime (class file version 61.0)

maven版本未指定导致编译失败问题

Execution default of goal org.springframework.boot:spring-boot-maven-plugin:3.1.3:repackage faile
d: Unable to load the mojo 'repackage' in the plugin 'org.springframework.boot:spring-boot-maven-plugin:3.1.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/springfra
mework/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
image

解决方案

指定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>
posted @   秋夜雨巷  阅读(998)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· winform 绘制太阳,地球,月球 运作规律
· 上周热点回顾(3.3-3.9)
历史上的今天:
2020-08-28 Sigar监控服务器环境
点击右上角即可分享
微信分享提示