未找到項目 '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>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM