springboot依赖导入失败
IDEA导入SpringBoot项目全部报错,依赖找不到
恶心。。。。。。。
两天了。就因为我把repository删除了。然后想重新下过。更新一下项目。但是发现我做了任何的配置,设置。导包。clear。等等等。都没用。
发现,是我家宽带有限制,下不来。然后我设置镜像,就可以了。
方案一:在maven中settings配置阿里镜像
<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>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
方案二:在项目的pom.xml中配置镜像(阿里)
</build>
<repositories>
<repository>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>
</project>