解决springboot等以maven工具来构建项目的依赖包下载过慢问题

IDEA中新建了一个springboot项目,但是依赖的jar包下载很慢。

使用阿里云maven镜像,在maven的settings.xml中加入下面一段配置就可以很快的下载到jar包。

避免去maven中央仓库下载,过慢或者对应版本不存在。

下面第一个节点是阿里云镜像。

 <mirrors>
    <mirror>
    <id>nexus-aliyun</id>
    <mirrorOf>*</mirrorOf>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>
     <mirror>
      <id>central</id>
      <mirrorOf>central</mirrorOf>
      <name>定义一个容易看懂的名称 </name>
      <url>http://repo1.maven.org/maven2</url>
    </mirror>
    <mirror>
      <id>nexusMirror</id>
      <mirrorOf>*</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://192.168.8.188:8081/nexus/content/groups/public/</url>
    </mirror>
  </mirrors>

猜你喜欢

转载自blog.csdn.net/qq_37604508/article/details/80293331