Native environment:
- Win10 Home Edition 64
- IDEA 2019.3.1
- Spring 5.1.x
- Gradle 5.6.4
- Git 2.20.1
0, the compiler environment initialization
The environment described above are installed, configured environment variables:
GRADLE_HOME:
GRADLE_USER_HOME:
then look at Gradle version follows CMD means that the configuration is successful:
1, Spring Source download
- 1, can be downloaded from the official website: the Spring Framework-official Github Download
- 2, but the address above is slow, you know. Country code cloud has a synchronous mirroring, synchronization once a day, just want to learn about Spring source of students, this new code synchronization frequency is enough. Download: Code cloud images: Spring-Framework
After I git clone cloud code this image down, switching to 5.1.x branch.
2, the compiler - Import sources
Spring-framework there is a source directory import IDEA documentation: == import-into-idea.md ==, reads as follows:
_Within your locally cloned spring-framework working directory:_
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
1, we cmd into this root directory, then to compile the spring-oxm this project, because other spring assembly will depend on this.
2, IDEA which import the root directory of the project:
After selecting the Spring-framework directory, select Import way Gradle, then click finish:
3, and then click File - Project Structure into modules which exclude the Spring-aspect catalog:
5, then, Gradle modify the configuration file, the modified version is 5.6.4:
D: \ Study \ the Spring-Framework-5.1.x-gitee \ the Spring-Framework \ Gradle \ wrapper \ gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=file\:/D:/DevEnv/gradle-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
== distributionUrl value of this parameter to point to your local downloaded zip package path 5.6.4 ==
Gradle also modify Cache.properties inside the corresponding version:
D: \ Study \ the Spring-Framework-5.1.x-gitee \ the Spring-Framework.gradle \ buildOutputCleanup \ cache.properties
Then, configure Gradle in IDEA inside for your own version:
Finally, IDEA which opens a terminal Terminate, enter the command to compile:
After == compiled, IDEA will automatically create resource index project, and then expand the project directory, the directory of all the Spring Package, the file folder icon to the left of the lower right corner there are the blue logo, the logo was compiled = =