• 解决 SpringBoot 依赖导入过慢问题


    在搭建Maven工程时,解决导入依赖过慢问题可以通过设置镜像仓库为阿里云镜像仓库来解决,springboot项目解决此问题也一样。

    有两种设置方法:

    方法一:

    在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>

    方法二:

    在Maven的 config / setting.xml 文件中添加如下代码(更改镜像为阿里云)

      <mirror>  
          <id>nexus-aliyun</id>  
          <mirrorOf>central</mirrorOf>    
          <name>Nexus aliyun</name>  
          <url>http://maven.aliyun.com/nexus/content/groups/public</url>  
       </mirror>
  • 相关阅读:
    Kafka日志及Topic数据清理
    python
    kotlin集合操作
    tomcat 下配置 可 调试
    linux 安装nexus3
    启动 idea 编译报错 kotlin
    nginx 增加 lua模块
    logstash配合filebeat监控tomcat日志
    redis 高级特性 不要太好用
    SpringBoot与Docker1
  • 原文地址:https://www.cnblogs.com/churujianghudezai/p/12717725.html
Copyright © 2020-2023  润新知