导入springboot项目的时候出现了这个错误!parent爆红
Project build error: Non-resolvable parent POM for model:maven01:0.0.1-SNAPSHOT
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.18.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
网上找了很多方法都无效,在群里问,告知要在maven的setting.xml里配置阿里的mirror。
<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>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>CN</id>
<mirrorOf>central</mirrorOf>
<name>OSChina Central</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
当然eclipse和maven还要再update一次
windows-preference-maven-user settings-update settings-apply
然后windows-show view-other-maven-mavenrRepositories,在出现的localRepository右键rebuild index
然后更新工程,右键maven-update project
OK!