idea 编译spring源码 spring5.2.0

安装gradle的,一定记得配置环境变量,省略。
gradle下载:https://services.gradle.org/distributions/
我的gradle版本是:5.6
spring源码版本:5.2.0
地址:https://github.com/spring-projects/spring-framework

看下源码下的spring-source\spring-framework-master\import-into-idea.md

Steps

Within your locally cloned spring-framework working directory:
1.先安装spring-oxm ,执行spring-source\spring-framework-master\gradlew.bat,这里很可能报错,例如:下载gradle-5.6-bin.zip失败,请看下面的解决方法

  1. Precompile spring-oxm with ./gradlew :spring-oxm:compileTestJava
  2. Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle)
  3. When prompted exclude the spring-aspects module (or after the import via File-> Project Structure -> Modules)
  4. Code away

idea配置:

idea 编译spring源码 spring5.2.0_第1张图片

下载gradle-5.6-bin.zip失败的解决方法:
配置gradle代理:打开spring-source\spring-framework-master\gradle.properties文件
加入下面配置代理代码
systemProp.http.proxyHost=proxy.xx.com.cn
systemProp.http.proxyPort=80
systemProp.https.proxyHost=proxy.xx.com.cn
systemProp.https.proxyPort=80
再重新在cmd执行 gradlew :spring-oxm:compileTestJava
idea 编译spring源码 spring5.2.0_第2张图片

你可能感兴趣的:(bug,spring,源码)