spring-How to successfully import the spring source into eclipse

Source: Internet
Author: User

First, from GitHub download spring source to the Machine II, the use of Gradle compiled spring source code

Environment:

-Spring source version: spring-framework-4.3.x

-Gradle Version: gradle-4.3

-Java version: jdk1.8.0_65

-Win 7

  Focus: JDK version is important, be sure to jdk1.8, this is I personally tested, other versions of the JDK, the execution of Gradle will report the JDK version of the exception

  Installing Gradle

1. Download Gradle

2, unzip the downloaded file Gradle-4.3-all.zip

3. Configure Environment variables

    

compiling spring source with Gradle

    1. After entering spring-framework-4.3.x, find Gradlew.bat under the catalogue.

2, double-click Gradlew.bat, wait a moment, command execution finished (preferably open FQ software, to prevent the download time-out and failed)

3, found in the directory found Import-into-eclipse.bat

4. Double-click Import-into-eclipse.bat

    

If everything works, start compiling the project. Because the spring project is made up of many modules, such as core, AOP, beans, and so on. If it is not necessary, it is recommended that a project be compiled. For example, I first compile the Spring-beans module

First enter the Spring-beans project path and execute the gradle command:gradle Cleanidea Eclipse. Wait a few minutes and if it goes well, it will print out the BUILD successful

  Then you can import the source into your eclipse.

third, the question:

  An exception occurred while executing gradle cleanidea eclipse java.lang.noclassdeffounderror:org/gradle/listener/actionbroadcast

How to solve it? Open the source directory of the Build.gradle file, the original version is 1.1 changed to 2.5 just fine

Reference:

"1" blog, 78388834

"2" personal blog, https://donaldhan.github.io/springframework/2017/12/13/%E5%A6%82%E4%BD%95%E4%BB%8Egithub%E4%B8%8A%E6% 8b%89%e5%8f%96spring-framwork%e6%ba%90%e7%a0%81%e9%a1%b9%e7%9b%ae-%e5%b9%b6%e5%af%bc%e5%85%a5%e5%88% B0eclipse.html

spring-How to successfully 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.