1.下载源码
git clone --branch v5.2.8.RELEASE https://gitee.com/Z201/spring-framework.git
2.修改配置文件
- 修改settings.gradle文件
repositories {
gradlePluginPortal()
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://repo.spring.io/plugins-release' }
}
- 修改build.gradle文件
注释 // id "io.spring.gradle-enterprise-conventions" version "0.0.2" 编译不通过
repositories {
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
mavenCentral()
maven { url "https://repo.spring.io/libs-spring-framework-build" }
}
- 修改gradle.properties文件
version=5.2.8.RELEASE
org.gradle.jvmargs=-Xmx2048M
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.daemon=true
3. 编译
找到spring源码目录cmd运行 gradlew :spring-oxm:compileTestJava
spring.png
idea安装Kotlin
image.pngspring源码导入idea
image.png找到spring源码目录
image.png image.png
网友评论