- Spring源码下载
- Spring源码编译
- 1、新增下载源地址
- 2、修改依赖地址
注意:Spring源码使用的是Gradle,而不是Maven。因此下载Spring源码之前可以先安装Gradle,参考:Gradle的下载、安装和配置环境。
Spring源码gitee地址:https://gitee.com/mirrors/Spring-framework。
Spring源码gitee仓库地址:
https://gitee.com/mirrors/Spring-framework.git
Spring源码github地址:https://github.com/spring-projects/spring-framework。
Spring源码github仓库地址:
https://github.com/spring-projects/spring-framework.git
从远程仓库下载项目的流程,参考:idea下载git仓库中的项目
Spring源码编译 1、新增下载源地址在settings.gradle和build.gradle两个配置文件中新增阿里云仓库地址。
settings.gradle配置文件
repositories {
//spring源码中已有的配置
gradlePluginPortal()
//新增的阿里云仓库地址的配置
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
//新增的阿里云仓库地址的配置
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
//spring源码中已有的配置
maven { url "https://repo.spring.io/plugins-release" }
}
build.gradle配置文件
repositories {
//新增的阿里云仓库地址的配置
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
//新增的阿里云仓库地址的配置
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
//spring源码中已有的配置
mavenCentral()
//spring源码中已有的配置
maven { url "https://repo.spring.io/libs-spring-framework-build" }
}
2、修改依赖地址
修改gradle-wrapper.properties配置文件中的配置
distributionbase=GRADLE_USER_HOME distributionPath=wrapper/dists #spring源码中原来的配置,去下载依赖 #distributionUrl=https://services.gradle.org/distributions/gradle-7.2-bin.zip #去本地寻找依赖 distributionUrl=file:///D:/worktools/Gradle/gradle-7.2-all.zip zipStorebase=GRADLE_USER_HOME zipStorePath=wrapper/dists



