Spring source of environmental structures
Read the source code version 5.0x. https://github.com/spring-projects/spring-framework/tree/5.0.x
Steps
The first step: to find the corresponding item on github, switching the corresponding branch, so that after downloading
https://github.com/spring-projects/spring-framework/
Direct download to a local, decompression.
Step Two: With InteliJ IDEA into the project.
When using the embodiment gradle Spring managed using gradle introduced
Supplementary exception:
Plugin [id: 'com.gradle.build-scan', version: '1.8'] was not found in any of the following sources: this problem is not first choice:
use local gradle distribution
The first time you use the import mode, jar package will download, the process is relatively long.
The third step : solve cglib
and objenesis
compile errors
Spring the latest cglib and objensesis to repackage, directly on the jar, this time you need to make it up the corresponding jar
Download spring-cglib-repack-3.2.0.jar和spring-objenesis-repack-2.1.jar
the corresponding directory, so that after recompiling the above problems can be solved
in spring-core.gradle
an increase
compile fileTree(dir: ‘libs’,include :’*.jar’)
Link: https: //pan.baidu.com/s/1_19njE2d4wLawMWKwcruAA extraction code: je8z
Step Four: AspectJ compiler problem solving
Ajc AspectJ compiler support needs. In the high version of the IDEA compiler support. Description not continue
Run a test case to run properly, you can build Spring source indicates the approximate construction completion.
Reference: Chapter "Spring Source depth analysis"