Spring source of environmental structures

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/

Here Insert Picture DescriptionDirect download to a local, decompression.


Step Two: With InteliJ IDEA into the project.

Here Insert Picture Description

When using the embodiment gradle Spring managed using gradle introduced

Here Insert Picture Description

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

Here Insert Picture Description

The first time you use the import mode, jar package will download, the process is relatively long.


The third step : solve cgliband objenesiscompile errors
Spring the latest cglib and objensesis to repackage, directly on the jar, this time you need to make it up the corresponding jar

Here Insert Picture DescriptionDownload spring-cglib-repack-3.2.0.jar和spring-objenesis-repack-2.1.jarthe corresponding directory, so that after recompiling the above problems can be solved
willin spring-core.gradlean increase

compile fileTree(dir: ‘libs’,include :’*.jar’)

Link: https: //pan.baidu.com/s/1_19njE2d4wLawMWKwcruAA extraction code: je8z

Here Insert Picture Description


Step Four: AspectJ compiler problem solving

Ajc AspectJ compiler support needs. In the high version of the IDEA compiler support. Description not continue

Here Insert Picture Description

Run a test case to run properly, you can build Spring source indicates the approximate construction completion.

Here Insert Picture Description


Reference: Chapter "Spring Source depth analysis"

Published 274 original articles · won praise 119 · views 290 000 +

Guess you like

Origin blog.csdn.net/qq_31156277/article/details/103832261