Eclipse or (STS tool) uses Spring-framework source code

Source: Internet
Author: User

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:

    1. Omit installation steps ....
    2. Run gradle-v on the command line to check if the configuration is properly installed;
    3. Enter the Spring-framework directory, execute the command: Gradle eclipse-x: Eclipse (Find this more useful)
    4. Then run the Import-into-eclipse.bat in the Spring Framework root directory again on the command line
    5. Twice in a row, you can start to build automatically;
    6. In the middle of the situation is stopped, press CTRL + C to terminate, and then run can go on;
    7. The process takes some time (several hours is possible), depending on the speed of downloading various dependent jar packages and DOM files;
    8. 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

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.