解决 SpringBoot 依赖导入过慢问题

在搭建 Maven 项目时,解决依赖导入慢问题是通过更改 setting.xml 的镜像仓库为阿里云镜像仓库 ,Spring Boot 解决此问题也一样

打开 SpringBoot 项目的 Pom.xml 文件,在里面添加下列代码(更改镜像为阿里云)

<repositories>
        <repository>
            <id>aliyun-repos</id>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>aliyun-plugin</id>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

然后点击开始导入依赖,你会发现用国内阿里云仓库速度飞起!!!

经验分享 程序员 微信小程序 职场和发展