I. Preparations
1. Download and install STS (springsource recommended), after all, people's framework with his own IDE is the best, of course, STS is the basic eclipse,: http://www.springsource.org/downloads/sts-ggts
2. download and install gradle. The spring source code is supported by gradle. gradle download: http://www.gradle.org/downloads, set the environment variable after the download: gradle_home = gradle home directory, and add in path; % gradle_home % \ bin;
3. Download and install GitHub, spring source code hosted on GitHub: http://windows.github.com/(Windows), of course, you need to register a GitHub account, spring GitHub hosting address: https://github.com/SpringSource/spring-framework
2. Import springframework to eclipse (STS)
1. Generate eclipse configuration.
Go to the spring source code directory. The structure is as follows:
We can see that spring provides us with a script to import eclipse and execute the script.
However, if the script provided by spring in my experiment is half executed, the problem may occur. I don't know why. Instead, we use the gradle command to replace the script provided to us:
Go to the spring directory and run the following command: gradle eclipse-X: Eclipse
It takes a long time for the first execution, and gradle downloads many dependent libraries. The result of the execution is as follows, because it takes a little time for me to execute it before.
F: \ GitHub \ spring-framework> gradle eclipse-X: Eclipse
: Buildsrc: clean
: Buildsrc: compilejava up-to-date
: Buildsrc: compilegroovy
: Buildsrc: processresources
: Buildsrc: Classes
: Buildsrc: jar
: Buildsrc: assemble
: Buildsrc: compiletestjava up-to-date
: Buildsrc: compiletestgroovy up-to-date
: Buildsrc: processtestresources up-to-date
: Buildsrc: testclasses up-to-date
: Buildsrc: Test
: Buildsrc: Check
: Buildsrc: Build
The configurationcontainer. Add () method has been deprecated and is scheduled to be removed
In gradle 2.0. Please use the CREATE () method instead.
The Groovy configuration has been deprecated and is scheduled to be removed in gradle 2.0.
Typically, usages of 'groovy 'can simply be replaced with 'compile'. In some cases, it ma
Y be necessary to additionally configure the 'policyclasspath' property of policycompile
Nd yydoc tasks.
The taskcontainer. Add () method has been deprecated and is scheduled to be removed in gradl
E 2.0. Please use the CREATE () method instead.
: Spring-AOP: eclipseclasspath
: Spring-AOP: eclipsejdtprepare
: Spring-AOP: eclipsejdt
: Spring-AOP: eclipseproject
: Spring-AOP: eclipsesettings
: Spring-AOP: eclipsewstcomponent
: Spring-AOP: Eclipse
: Spring-aspects: eclipseclasspath
: Spring-aspects: eclipsejdtprepare
: Spring-aspects: eclipsejdt
: Spring-aspects: eclipseproject
: Spring-aspects: eclipsesettings
: Spring-aspects: eclipsewstcomponent
: Spring-aspects: Eclipse
: Spring-Beans: eclipseclasspath
: Spring-Beans: eclipsejdtprepare
: Spring-Beans: eclipsejdt
: Spring-Beans: eclipseproject
: Spring-Beans: eclipsesettings
: Spring-Beans: eclipsewstcomponent
: Spring-Beans: Eclipse
: Spring-Build-Src: eclipseclasspath
: Spring-Build-Src: eclipsejdtprepare
: Spring-Build-Src: eclipsejdt
: Spring-Build-Src: eclipseproject
: Spring-Build-Src: eclipsesettings
: Spring-Build-Src: eclipsewstcomponent
: Spring-Build-Src: Eclipse
: Spring-context: eclipseclasspath
: Spring-context: eclipsejdtprepare
: Spring-context: eclipsejdt
: Spring-context: eclipseproject
: Spring-context: eclipsesettings
: Spring-context: eclipsewstcomponent
: Spring-context: Eclipse
: Spring-context-support: eclipseclasspath
Download http://repo.springsource.org/libs-release/commons-logging/commons-logging/1.1.3/c
Ommons-logging-1.1.3.pom
Download http://repo.springsource.org/libs-release/commons-logging/commons-logging/1.1.3/c
Ommons-logging-1.1.3.jar
: Spring-context-support: eclipsejdtprepare
: Spring-context-support: eclipsejdt
: Spring-context-support: eclipseproject
: Spring-context-support: eclipsesettings
: Spring-context-support: eclipsewstcomponent
: Spring-context-support: Eclipse
: Spring-core: eclipseclasspath
: Spring-core: eclipsejdtprepare
: Spring-core: eclipsejdt
: Spring-core: eclipseproject
: Spring-core: eclipsesettings
: Spring-core: eclipsewstcomponent
: Spring-core: Eclipse
: Spring-expression: eclipseclasspath
: Spring-expression: eclipsejdtprepare
: Spring-expression: eclipsejdt
: Spring-expression: eclipseproject
: Spring-expression: eclipsesettings
: Spring-expression: eclipsewstcomponent
: Spring-expression: Eclipse
: Spring-instrument: eclipseclasspath
: Spring-instrument: eclipsejdtprepare
: Spring-instrument: eclipsejdt
: Spring-instrument: eclipseproject
: Spring-instrument: eclipsesettings
: Spring-instrument: eclipsewstcomponent
: Spring-instrument: Eclipse
: Spring-instrument-Tomcat: eclipseclasspath
: Spring-instrument-Tomcat: eclipsejdtprepare
: Spring-instrument-Tomcat: eclipsejdt
: Spring-instrument-Tomcat: eclipseproject
: Spring-instrument-Tomcat: eclipsesettings
: Spring-instrument-Tomcat: eclipsewstcomponent
: Spring-instrument-Tomcat: Eclipse
: Spring-jdbc: eclipseclasspath
: Spring-jdbc: eclipsejdtprepare
: Spring-jdbc: eclipsejdt
: Spring-jdbc: eclipseproject
: Spring-jdbc: eclipsesettings
: Spring-jdbc: eclipsewstcomponent
: Spring-jdbc: Eclipse
: Spring-JMS: eclipseclasspath
: Spring-JMS: eclipsejdtprepare
: Spring-JMS: eclipsejdt
: Spring-JMS: eclipseproject
: Spring-JMS: eclipsesettings
: Spring-JMS: eclipsewstcomponent
: Spring-JMS: Eclipse
: Spring-ORM: eclipseclasspath
: Spring-ORM: eclipsejdtprepare
: Spring-ORM: eclipsejdt
: Spring-ORM: eclipseproject
: Spring-ORM: eclipsesettings
: Spring-ORM: eclipsewstcomponent
: Spring-ORM: Eclipse
: Spring-orm-hibernate4: eclipseclasspath
: Spring-orm-hibernate4: eclipsejdtprepare
: Spring-orm-hibernate4: eclipsejdt
: Spring-orm-hibernate4: eclipseproject
: Spring-orm-hibernate4: eclipsesettings
: Spring-orm-hibernate4: eclipsewstcomponent
: Spring-orm-hibernate4: Eclipse
: Spring-oxm: eclipseclasspath
: Spring-oxm: eclipsejdtprepare
: Spring-oxm: eclipsejdt
: Spring-oxm: eclipseproject
: Spring-oxm: eclipsesettings
: Spring-oxm: eclipsewstcomponent
: Spring-oxm: Eclipse
: Spring-Struts: eclipseclasspath
: Spring-Struts: eclipsejdtprepare
: Spring-Struts: eclipsejdt
: Spring-Struts: eclipseproject
: Spring-Struts: eclipsesettings
: Spring-Struts: eclipsewstcomponent
: Spring-Struts: Eclipse
: Spring-test: eclipseclasspath
: Spring-test: eclipsejdtprepare
: Spring-test: eclipsejdt
: Spring-test: eclipseproject
: Spring-test: eclipsesettings
: Spring-test: eclipsewstcomponent
: Spring-test: Eclipse
: Spring-test-MVC: eclipseclasspath
: Spring-test-MVC: eclipsejdtprepare
: Spring-test-MVC: eclipsejdt
: Spring-test-MVC: eclipseproject
: Spring-test-MVC: eclipsesettings
: Spring-test-MVC: eclipsewstcomponent
: Spring-test-MVC: Eclipse
: Spring-TX: eclipseclasspath
: Spring-TX: eclipsejdtprepare
: Spring-TX: eclipsejdt
: Spring-TX: eclipseproject
: Spring-TX: eclipsesettings
: Spring-TX: eclipsewstcomponent
: Spring-TX: Eclipse
: Spring-Web: eclipseclasspath
: Spring-Web: eclipsejdtprepare
: Spring-Web: eclipsejdt
: Spring-Web: eclipseproject
: Spring-Web: eclipsesettings
: Spring-Web: eclipsewstcomponent
: Spring-Web: Eclipse
: Spring-webmvc: eclipseclasspath
: Spring-webmvc: eclipsejdtprepare
: Spring-webmvc: eclipsejdt
: Spring-webmvc: eclipseproject
: Spring-webmvc: eclipsesettings
: Spring-webmvc: eclipsewstcomponent
: Spring-webmvc: Eclipse
: Spring-webmvc-Portlet: eclipseclasspath
: Spring-webmvc-Portlet: eclipsejdtprepare
: Spring-webmvc-Portlet: eclipsejdt
: Spring-webmvc-Portlet: eclipseproject
: Spring-webmvc-Portlet: eclipsesettings
: Spring-webmvc-Portlet: eclipsewstcomponent
: Spring-webmvc-Portlet: Eclipse
: Spring-webmvc-tiles3: eclipseclasspath
: Spring-webmvc-tiles3: eclipsejdtprepare
: Spring-webmvc-tiles3: eclipsejdt
: Spring-webmvc-tiles3: eclipseproject
: Spring-webmvc-tiles3: eclipsesettings
: Spring-webmvc-tiles3: eclipsewstcomponent
: Spring-webmvc-tiles3: Eclipse
Build successful
Total time: 1 mins 57.462 secs
After the execution is completed, you can see several more files or directories under each subdirectory, which is to configure the Eclipse project and classpath as follows:
The. settingsh folder and. classpath and. Project are the configurations just generated.
2. Import eclipse
Eclipse: import->
Work done