Spring Source Code environment-4.3.6, spring source code-4.3.6

Source: Internet
Author: User

Spring Source Code environment-4.3.6, spring source code-4.3.6
1. Preface

I wrote a note about setting up the Spring 3.2.x source code environment and found that the Spring source code of version 3.2.x is too old, as a result, many errors may occur after the code is imported, which requires manual processing or even re-modification of the jar version on which the dependency was created to build the source code environment. The original intention is to learn the source code, the core of Spring source code is mainly AOP and IOC, and these two parts are basically stable in version iteration. Therefore, the version upgrade has no impact on our learning framework. This time we chose Spring 4. build a Spring environment with the source code of Version x
2. Download the source code
This part is not repeated, to GitHub directly download the corresponding version of Spring source code can be: https://github.com/spring-projects/spring-framework/releases
3. Build a project

1. Download the source code and view the README. md file in the root directory.

2, execute./import-into-eclipse.sh (JDK8 required ),

STS-an eclipse-based Spring IDE tool-Eclipse downloads: http://download.eclipse.org/eclipse/downloads-STS downloads: http://spring.io/tools/sts/all-STS nightly builds: http://dist.springsource.com/snapshot/STS/nightly-distributions.html

Wait patiently for a while and execute step 1, about 15 minutes

Step 1 is successful. Continue Step 2:

Steps 2, 3, 4, and 5 are the same.

Run./gradlew install (about 13 minutes)

Execute./gradlew build (about 10 minutes)

4. Download and install STS (spring-tool-suite)
Spring provides an eclipse-based Spring IDE, the STS tool for short, will bring a lot of convenience when learning Spring download and install STS: https://spring.io/tools/sts/all

After the download is complete, install and start STS:

5. Import the project

Import spring source code project

In this case, the project reports an error because groovy is required for Spring build.

6. Install groovy
Install groovy: http://groovy-lang.org/download.htmlbrewinstallation :brave :~ Brave $ brew install groovy view version: Brave :~ Brave $ groovy-vGroovy Version: 2.4.12 JVM: 1.8.0 _ 51 Vendor: Oracle Corporation OS: Mac OS X at this time, the Spring Project in eclipse still reports an error, the reason is that eclipse needs to install the corresponding version of the groovy plug-in. Note: The groovy plug-in must match the eclipse version, otherwise it will not work.

7. Install the eclipse-groovy plug-in

Install plug-ins:

In eclipse Help-> Install New Software, download the groovy plug-in

STS version 3.9.2 is based on eclipse4.7.2. You need to download the groovy plug-in of the corresponding version (version 4.7)

- Spring Tool Suite:https://spring.io/tools/sts/all- Groovy/Grails Tool Suite:https://spring.io/tools/ggts/all

4.7 Groovy plug-in address:
Http://dist.springsource.org/release/GRECLIPSE/e4.7/

Generally, after installing the groovy plug-in, restart eclipse-> clean to solve the problem.
But sometimes it will continue to report errors, which may be caused by compilation problems caused by the groovy version.

8. Groovy compilation version Problems

The following error will be reported when compiling Groovy:

Modify the groovy compiler version in eclipse Configuration:

Restart eclipse after conversion. Solve the problem after restart

9. Spring4.3.6 source code compilation is complete.

The compilation is completed as follows:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.