SpringBoot项目Maven引用报错:spring-boot-starter-parent:pom:1.5.2.RELEASE找不到的问题

一、问题的描述

Project build error: Non-resolvable parent POM for com.example:demo-1:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.5.2.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository

二、 尝试解决的办法

方法一、打开终端,进入项目的根目录,然后使用 maven bin 目录下的 mvn 编译命令编译一下(也就是mvn compile),完成之后右键项目 选择Maven,之后选择Update Project 。然而,测试结果表明问题没有解决;
方法二、maven的setting.xml 配置文件配置得不对,路径:E:\apache-maven-3.6.0-bin\apache-maven-3.6.0\conf\setting.xml,修改里面的部分内容如下,直接复制即可:


         
              repo2 
              central 
              spring2.0 for this Mirror. 
              https://repo.spring.io/libs-milestone 
         
         
          net-cn 
          central 
          Human Readable Name for this Mirror. 
          http://maven.net.cn/content/groups/public/  
         
         
              ui 
     
          central 
              Human Readable Name for this Mirror. 
             http://uk.maven.org/maven2/ 
         
         
          ibiblio 
          central 
          Human Readable Name for this Mirror. 
         http://mirrors.ibiblio.org/pub/mirrors/maven2/ 
         
         
              jboss-public-repository-group 
              central 
              JBoss Public Repository Group 
             http://repository.jboss.org/nexus/content/groups/public 
        
    
    
        
            neo
            
                true
                1.8
            
            
                    
                        spring-milestones
                        Spring Milestones
                        https://repo.spring.io/libs-milestone
                        
                            false
                        
                    
            
        
    
    
        neo     
    

测试后,该问题成功解决!

你可能感兴趣的:(SpringBoot问题解决)