This is the fourth day of my participation in Gwen Challenge

Time to read the source code ~

The environment

  1. Source: spring5.2. X
  2. jdk11.08
  3. idea2020.1

spring

Spring5.2. x source code download address

gradle

download

Take a look at the gradle version used by Spring, remember to point the distributionUrl to your local Gradle package, or you will still download it.

DistributionUrl = file:///H:/download/gradle-5.6.4-bin.zip

Gradle download address

The installation

In window, configure environment variablesGRADLE_HOMEandGRADLE_USER_HOME(A directory for storing library files)

Finally, type gradle -v. If you see the following result, the installation is successful

Configuring the Maven Repository

Find the build.gradle file in the source code root path, add the following code in the Repository, change the Maven address to Ali Cloud repository.

/ / new ali cloud warehouse maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'} / / new source maximizes warehouse maven {url "http://repo.springsource.org/plugins-release" } maven { url "https://repo.spring.io/plugins-release" }Copy the code

To build the source code

gradlew.bat

Find it in the Spring source root pathgradlew.batAnd in thecmdRun in windowWaiting for download, failure may be due to network reasons, if configured maven repository should be able to download ๐Ÿ˜„ smoothly

Import the idea of

Find the import-into-idea.md file in your Spring project, open it, and follow step.

Execute gradlew :spring-oxm:compileTestJava in the root path

Finally, a successful build appears below

Import step

Idea version: Import IntelliJ IDEA 2020.1

Here the first time import may need to manually stop, and then go to set up the idea gradle local repository, or directly download to disk C, can not resist ๐Ÿ˜ฎ, and local gradle, or idea to download ๐Ÿท

The results of

You can see the picture below for success

Then press shift twice in a row to locate the ApplicationContext class and press CTRL + Shift + Alt + U to see ๐Ÿ˜‹

We can find a unit test run ๐Ÿ˜, find a familiar toolkit to try haha path: \ \ spring – framework – 5.2 x spring – the core \ SRC \ test \ Java \ org \ springframework \ util \ StringUtilsTests Java

Then you can start to toss ~

Welcome attention, make a friend!! (โ€ขฬ€ ฯ‰ โ€ขฬ)y

Hey, hey, I’m 4ye. See you next time! ๐Ÿ˜„

If you found this article helpful, please give it a thumbs up ๐Ÿ˜

Let’s start this unexpected meeting! ~

Welcome to leave a message! Thanks for your support! ใƒพ(โ‰งโ–ฝโ‰ฆ*)o go!!