Spring Boot项目,使用Maven下载依赖非常慢。建议采用阿里镜像库,稳定且速度快。
1、找到Maven的配置文件
在Maven的安装目录里config里可以找到配置文件settings.xml:
2、添加阿里云镜像库地址
在settings.xml
文件里找到<mirrors>
节点,添加阿里云镜像库地址:
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>