The main reference is this article: http://blog.csdn.net/zeuskingzb/article/details/41425421
And: http://blog.163.com/lixuesheng_12/blog/static/72940412013915104536267/
First, the tool preparation:
1. Download the installation STS (Spring Tool Suite): The Http://spring.io/tools STS is based on the Eclipse development environment and is customized to develop the Spring application, and it is recommended to use
2. Download the installation Gradle: Http://www.gradle.org/downloads Spring Framework uses Gradle for project management and requires it for project building
After downloading the decompression, configure the environment variable: new Gradle_home-value is D:\Coding\gradle-2.2.1 path, add;%gradle_home%\bin;
3. Download the installation jdk8: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Spring-framework uses a number of JDK8 features, preferably using JDK8 as the compilation environment, or there will be some errors.
4. Download Spring-framework source code (https://github.com/spring-projects/spring-framework)
GitHub download: git clone [email protected]:spring-projects/spring-framework.git
5. What needs to be installed under Eclipse (for eclipse4.6 version)
STS plugin Http://spring.io/tools/sts/all Eclispe plug-in version
Ajdt:http://download.eclipse.org/tools/ajdt/46/dev/update
Second, the basic steps are as follows:
- Omit installation steps ....
- Run gradle-v on the command line to check if the configuration is properly installed;
- Enter the Spring-framework directory, execute the command: Gradle eclipse-x: Eclipse (Find this more useful)
- Then run the Import-into-eclipse.bat in the Spring Framework root directory again on the command line
- Twice in a row, you can start to build automatically;
- In the middle of the situation is stopped, press CTRL + C to terminate, and then run can go on;
- The process takes some time (several hours is possible), depending on the speed of downloading various dependent jar packages and DOM files;
- In the Eclipse menu File->import select exsiting Projects into workspace under General, so the import is complete.
If you perform a import-into-eclipse.bat flashback under Windows, go to the Spring directory and execute the command: Gradle eclipse-x: Eclipse
Iii. problems that may be encountered
- Issue one: spring-framework-4.0.0.m3 to use jdk1.8 (or byte to install version 1.8 JDK)
Direct report "-xx:maxmetaspacesize=1024m" and "could not create the Java Virtual machine" error. View Build.gradle and Gradlew.bat modifying JDK versions
- Issue 2: A heap memory overflow condition occurred during build
Gradlew.bat the memory settings, I do the experiment, the machine's memory is 8G, 64-bit system, directly use
Set gradle_opts=-xx:maxpermsize=2048m-xmx2048m-xx:maxheapsize=1024m%gradle_opts%xia
-
check out sources
git clone git://github.com/springsource/spring-framework.git
Compile and test, build all jars, Distribution zips and Docs
./gradlew build
Install all spring-* jars into your local Maven cache
./gradlew install
Import sources into your IDE
run ./ Import-into-eclipse.sh or read import-into-idea.md as appropriate.
- Operation Process:
lie-mac:~ xionglie$ CD ~/downloads/spring/
Lie-mac:spring xionglie$ git clone git://github.com/springsource/spring-framework.git
Lie-mac:spring xionglie$ CD Spring-framework
Lie-mac:spring-framework xionglie$./import-into-eclipse.sh
Eclipse or (STS tool) uses Spring-framework source code