How to associate Spring-framework documentation and source code in eclipse

Source: Internet
Author: User

1. Go to the official website to download the Spring-framework jar package

Spring-framework jar package is: http://repo.spring.io/release/org/springframework/spring/

2. Create a new user Library

Window->pereferences->java->build Path->user Libraries. Click New, create a new user Library, command "spring-framework-4.1.5", then add External jars, and so on.

3. Introduction of the new library into the project

Right-click the project->build path->add libraries->user library-> to select the newly created spring-framework-4.1.5.

4. Associating docs documents with SRC source code "This step must check the correct jar package and the correct directory for doc or src match"

Unzip the downloaded spring-framework-4.1.5.release-dist.zip found below the spring-framework-4.1.5.release\libs\ directory, Each jar package corresponds to a javadoc.jar and a sources.jar. So if you're using a class in a jar that needs to see the source code of the class or the Docs document, select the corresponding Javadoc.jar and Sources.jar directly. Specific as follows:

For example, the Org.springframework.beans.factory.BeanFactory interface is used in the code. This interface is known in Spring-beans-4.1.5.release.jar according to the package name.

(1) Associate Docs

Right-click the Spring-beans-4.1.5.release.jar package under Project and->properties->javadoc location, Select the Spring-beans-4.1.5.release-javadoc.jar in the spring-framework-4.1.5.release\libs\ after spring decompression, OK.

(2) associated SRC

Right-click the Spring-beans-4.1.5.release.jar package under Project, and then->properties->javadoc Source Attachment, Select the Spring-beans-4.1.5.release-sources.jar in the spring-framework-4.1.5.release\libs\ after spring decompression, OK.

5. View the API for a class

Select a class and press F1. Or use the shortcut key "Shift+f2".

How to associate Spring-framework documentation and source code in 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.