未找到项目 'org.springframework.boot:spring-boot-starter-parent:2.1.6.RELEASE'

背景:

      通过maven创建springboot时,在pom.xml文件中引入了一下代码

PS:maven配置详解:https://www.cnblogs.com/xd502djj/p/13259759.html

 

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.6.RELEASE</version>
    </parent>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>
View Code

      结果就爆红,百度了一下,按照之前说的改动没有解决

 

     后来删掉本地 .m2文件夹下的setting.xml文件中多余的<mirror>配置,只保留了阿里云的镜像,再看idea里面已经没有报错了

<mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
     -->
    <mirror>
        <id>alimaven</id>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>

 

posted @ 2022-01-25 15:16  狼窝窝  阅读(1512)  评论(0)    收藏  举报