idea创建的springboot出错的pom.xml依赖出错Failure to find org.springframework.boot:spring-boot-starter-parent:
idea:使用idea的Spring Initializr 创建spring boot项目,执行pom的依赖导入出错:<parent></parent>
1.问题描述
工具:idea
场景:使用idea的Spring Initializr 创建spring boot项目,执行pom的依赖导入出错:
Failure to find org.springframework.boot:spring-boot-starter-parent:pom:3.2.5.RELEASE in https://maven.aliyun.com/repository/public was cached in the local repository
pom.xml出错配置内容:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
2.排查问题
1.使用spring官网提供的https://start.spring.io/ 创建springboot,查pom.xml比对idea工具创建的
2.maven仓库查看版本https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent
3.结论
idea的spring-boot-starter-parent的version存在问题,自动加上了.RELEASE后缀导致的问题,删除version标签内的.RELEASE即可,如下配置。
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
更多推荐
所有评论(0)