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