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>

    

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐