How to import the spring source into eclipse

Source: Internet
Author: User

Pre-conditions:

1. Install the JDK correctly and configure the Java_home, PATH. (I'm installing jdk1.8 here.)

2. Install eclipse properly.

1. First download the spring source https://github.com/spring-projects/spring-framework/releases. Because my JDK version is 1.8, so the version i downloaded here is 4.3.2.

Unzip to the local directory when the download is complete.

2. The compilation of spring source code needs Gradle support, so we need to download Gradle gradle official website. https://gradle.org/. If you can't open it, you can go to my web drive. Download: http://pan.baidu.com/s/1kVGu8yr

Once the download is complete, you will only need to unzip to the local directory, but remember to configure the environment variable gradle_home and path at this time. When configured correctly, the cmd input: Gradle-v can correctly display the Gradle version.

3. Enter the spring source root directory, open a command window, enter the Import-into-eclipse.bat run script, start compiling the spring source code and generate the. classpath,. Project files that can be imported into eclipse.

In the process of compiling is likely to appear errors, this time need to be based on specific error information Baidu to solve. Here is a need to pay attention to the place is: the source code with the path of the Build.gradle file is generally the following words:

Compilejava {
Sourcecompatibility = 1.6
Targetcompatibility = 1.6
}

Compiletestjava {
sourcecompatibility = 1.8
targetcompatibility = 1.8
Options.compilerargs + = "-parameters"
}

This is to specify that the source code is compiled using the jdk1.6, while the test is compiled using jdk1.8. This is where you should install jdk1.8.

4. All the way to the completion of the compilation can be imported in Eclipse, remember to check the eclipse in the list of all the projects below the project options, otherwise the import is a big spring project instead of separate projects.

How to import the spring source into eclipse

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.