Spring IDE Guide
For Spring IDE installation, see: SpringideInstall
To start working with Spring IDE you need a SpringProject. A SpringProject can be created by adding the SpringProjectNature to an existing project or by creating a new Spring project with the SpringProjectWizard.
Add Spring Project Nature
- select project node(s) in Eclipse's resource navigator or JDT package explorer
- activate the context menu item "Add Spring Project Nature" on the selected project(s)
- once the SpringProjectNature is added, these projects are now decorated with a small 'S' in the upper right corner (overwriting other decorators, e.g. Java project decorator 'J')
- to remove the SpringProjectNature, right click the project and select "Remove Spring Project Nature"
See also: SpringProject, SpringProjectNature
Create New Spring Project
- open the wizard selection dialog via the menu "File / New / Project..."
- select the wizard "Spring / Spring Project"
- enter the project name
- (optionally) modify the comma-separated list of supported BeansConfig file extensions (default is "xml")
- if you don't need a Java project then deselect the checkbox "Create a Java project"
See also: SpringProject
Add References To Other Spring Projects (Optional)
- open the SpringProjectProperties dialog from a Spring project's context menu in Eclipse's resource navigator or JDT package explorer
- select the properties page "Project References" from the list on the left side
- enable all Spring projects containing Spring BeansConfig files which should be referenced from within this SpringProject via a BeansConfigSet (defined later on)
See also: SpringProjectProperties, BeansConfig, BeansConfigSet
Add Spring Beans Config Files
- open a Spring project's properties dialog from the context menu in Eclipse resource navigator or JDT package explorer
- select the SpringProjectProperties page "Spring Beans" from the list on the left side
- (optionally) modify the comma-separated list of supported BeansConfig file extensions (default is "xml")
- use the button "Add..." to open a selector dialog providing a list of all BeansConfig files with the specified extensions in your SpringProject and select the corresponding Spring BeansConfig files
- BeansConfig files stored in JAR files can be selected too, but the corresponding JAR file has to be part of the SpringProject, e.g. stored in "WEB-INF/lib/", and not only available on the classpath like the JDK's "rt.jar"!!!
- once the BeansConfig files are selected the corresponding files are decorated with a small 'S' in Eclipse's resource navigator or JDT package explorer
See also: BeansConfig
Create Spring Beans Config Sets (optional)
- open a Spring project's properties dialog from the context menu in Eclipse resource navigator or JDT package explorer
- select the SpringProjectProperties page "Spring Beans" from the list on the left side
- select the second tab labeled "Config Sets"
- use the button "New..." to open a dialog for creating a new BeansConfigSet with a selection of all BeansConfig files (added in the previous step) belonging to this BeansConfigSet
- define a unique name for the BeansConfigSet
- activate the checkbox "Enable bean override" if multiple beans with the same ID should be overidden by the last bean (used by the BeansConfigValidator only -> if activated then bean overriding is not treated as validation error)
- activate the checkbox "Is incomplete" if this BeansConfigSet t does not contain all beans which are referenced by other beans defined in this BeansConfigSet (used by the BeansConfigValidator only -> if activated then unresolved bean references are not treated as validation errors)
- externally defined BeansConfig files (as described in section "Add references to other Spring projects") are decorated with a small blue arrow)
- BeansConfig files which are part of a library are show with their full qualified name "<path to library> - <path to config file>"
- use the buttons "Move Up" and "Move Down" to change the order of the BeansConfig files within the BeansConfigSet (important for bean overriding)
See also: SpringProjectProperties, BeansConfig, BeansConfigSet, BeansConfigValidator
Open Spring Explorer
- select from within any of the added Spring BeansConfig files opened in an Eclipse editor the menu item "Navigate/Show In/Spring Beans"
- once the menu item is selected the Spring BeansView is opened and the corresponding Spring BeansConfig file is selected in the view's model
- double-clicking on certain entries in the Spring BeansView (bean, property or constructor argument) navigates to the corresponding location in the BeansConfig file
- by selecting the corresponding toolbar actions the BeansView supports alphabetical sorting and syncing with the BeansXmlEditor
See also: BeansView, BeansConfig, BeansXmlEditor
Validate Spring Beans Config
- after modifying and saving any of the added Spring BeansConfig files from within an open Eclipse editor this config is automatically validated by Spring IDE
- for any error occured during validation a SpringProblemMarker is created and listed in Eclipse's problem view
See also: BeansConfig, BeansConfigValidator
Open Spring Beans Graph
- right-clicking on certain entries in the Spring BeansView (config, config set or bean) opens a read-only editor showing a graph with all beans referenced by the selected view entry
See also: BeansView, BeansConfig, BeansConfigSet, BeansGraph
Search Spring Beans
- open the search dialog via the "Search / Search..." menu
- select the tab "Spring Beans Search" to switch to the BeansSearch dialog
See also: BeansSearch
External Links
Spring IDE Tutorial at VaanNila.com Introduction to Spring IDE 2.0 at JavaBeat.net
Attachments
- AddNature.png (55.5 kB) -
added screenshoot
, added by tjuerge on 07/16/05 16:14:33. - NatureAdded.png (11.3 kB) -
added screenshoot
, added by tjuerge on 07/16/05 16:14:44. - ProjectReference.png (67.9 kB) -
added screenshoot
, added by tjuerge on 07/16/05 16:36:31. - BeansView1.png (107.8 kB) -
added screen shoot
, added by tjuerge on 07/16/05 18:23:19. - BeansSearch.png (178.1 kB) -
Screenshoot of Spring Beans search dialog
, added by tjuerge on 04/04/06 23:21:51. - AddConfigFiles1.png (74.7 kB) -
Spring project properties dialog with BeansConfig tab
, added by tjuerge on 04/24/06 00:25:05. - AddConfigFiles3.png (31.0 kB) -
Package explorer with decorated BeansConfig files
, added by tjuerge on 04/24/06 00:26:00. - CreateConfigSets1.png (106.0 kB) -
Spring project properties dialog with BeansConfigSet tab
, added by tjuerge on 04/24/06 00:42:41. - BeansView2.png (211.8 kB) -
Editor and Beans View
, added by tjuerge on 04/24/06 00:52:00. - BeansGraph.png (155.8 kB) -
BeansGraph with outline view
, added by tjuerge on 04/24/06 01:13:27. - SpringProjectWizardSelection.png (31.1 kB) -
Screenshoot of wizard selection dialog
, added by tjuerge on 07/20/06 20:13:06. - SpringProjectWizard.png (55.9 kB) -
Screenshoot of Spring project wizard
, added by tjuerge on 07/20/06 20:13:47. - ValidationErrors.png (123.3 kB) -
Problem markers created by BeansConfigValidator
, added by tjuerge on 08/06/06 22:48:05. - AddConfigFiles2.png (36.2 kB) -
Spring project properties dialog with Add BeansConfig dialog
, added by tjuerge on 10/09/06 00:59:43. - CreateConfigSets2.png (40.1 kB) -
Create new BeansConfigSet dialog
, added by tjuerge on 10/09/06 01:00:15. - CreateConfigSets3.png (53.6 kB) -
Spring project properties dialog with BeansConfigSet tab
, added by tjuerge on 10/09/06 01:47:04.
Download in other formats:
















