描述:创建一个新的springboot项目时出现报错,经过查找发现是jdk8与springboot3.1.2不兼容

报错:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compe (default-compile) on project gulimall-coupon: Fatal error compiling

解决:在pom.xml中更改版本信息为2.3.3.RELEASE

<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<!--<version>3.1.2</version>-->
		<version>2.3.3.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

 

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐