Locating Spring Beans
See Also
When working in a Spring-enabled project, you may often need to quickly reference bean declarations
that you or other developers created elsewhere within a project. The Go to Spring Bean dialog
allows you to quickly find Spring beans that you have declared in your configuration files.
To locate a Spring bean:
- From the IDE's main menu, choose Navigate > Go to Spring Bean. The Go to Spring Bean
dialog opens.
- In the Type Name text field, enter the first few characters of the bean you are searching
for. The IDE filters the beans whose names begin with the entered characters and displays
the results in the Types Found pane.
- Click on one of the results, and the configuration file containing the bean declaration
opens in the Source Editor with the cursor on the first line of the declaration.
- To return results that are case sensitive to your input, select the Case Sensitive option.
- The Location text field displays the fully-qualified path to the source file containing
the bean.
- In order for the Go to Spring Bean dialog to be able to locate bean references, you must
ensure that the Spring configuration files that contain bean declarations you are searching
for are registered with the IDE. To do so, right-click on the project node and choose
Project Properties. Then, in the Spring Framework category, check that configuration
files are listed in the Configuration File panel. See Organizing
Spring Configuration Files for more details.
- The Go to Spring Bean dialog retrieves matches by comparing the entered data with a bean
name
,
id
, or alias
.
- You can also press Alt-Shift-B (Ctrl-Shift-B on Mac) to open the Go to Spring Bean dialog.
- See Also
- About Spring Framework Support
- Creating a Spring Configuration File
Legal Notices