美文网首页
spring源码阅读

spring源码阅读

作者: 晨曦_lcq | 来源:发表于2020-07-18 11:38 被阅读0次

安装gradle

allprojects{
   repositories {
       def REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public/'
       all { ArtifactRepository repo ->
           def url = repo.url.toString()
           if ((repo instanceof MavenArtifactRepository) && (url.startsWith('https://repo1.maven.org/maven2') || url.startsWith('https://jcenter.bintray.com'))) {
               project.logger.lifecycle 'Repository ${repo.url} replaced by $REPOSITORY_URL .'
               remove repo            }
       }
       maven {
           url REPOSITORY_URL        }
   }}

编译spring源码

allprojects {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
    }
}
image.png
  • 编译spring源码,在spring源码项目根目录执行:./gradlew :spring-oxm:compileTestJava
  • 修改setting.gradle文件,修改第一段代码的配置,增加阿里的镜像
pluginManagement {
    repositories {
        maven { url "https://maven.aliyun.com/repository/public" }
        gradlePluginPortal()
        maven { url 'https://repo.spring.io/plugins-release' }
    }
}

相关文章

网友评论

      本文标题:spring源码阅读

      本文链接:https://www.haomeiwen.com/subject/yuuxkktx.html