IntelliJ IDEA 2024.3 Help

Spring tool window

The Spring tool window lets you look at your project from the Spring perspective. It consists of the following tabs:

If, besides Spring, your project also has Micronaut or Java EE CDI dependencies, the tool window name will be Beans instead of Spring, and it will show all beans detected in your project.

Documentation

The Documentation tab allows you to view the bean documentation. Essentially, it provides you with the same information as the bean quick documentation.

Spring MVC tab

Bean Graph

The Bean Graph tab allows you to view graphs of the direct bean dependencies. For complex graphs and more advanced interaction (such as exporting diagram or showing diagrams of library beans), refer to Spring diagrams.

Spring MVC tab

MVC

The MVC tab is available if you select a controller. It allows you to view controller mappings for the Spring MVC framework.

The leftmost pane of the MVC tab shows the list of endpoints of your Spring application. Double-click a method to navigate to the source code of the corresponding controller method.

The rightmost pane shows documentation for the selected mapping.

Spring MVC tab

Data

The Data tab is available if you select a Spring repository. It lets you view query methods with their parameters and return types.

The leftmost pane shows repository methods. Double-click a method to navigate its source code.

The rightmost pane shows documentation for the selected query.

Spring MVC tab

Bean icons

Each Spring bean is marked with an icon:

  • Spring Java bean: auto-discoverable beans declared with @Component annotations as well as methods annotated with @Bean.

  • : configuration beans (annotated with @Configuration or other annotations that implicitly include @Configuration).

  • : repository beans (annotated with @Repository or extending the org.springframework.data.repository.Repository interface).

  • : controllers (classes annotated with @Controller and @RestController).

  • Spring bean: implicit beans—that is, service beans added by Spring that are not defined explicitly.

  • Spring abstract beans: abstract XML beans (defined with the abstract="true" attribute in XML files).

  • Spring abstract beans: infrastructure beans—that is, beans defined in XML files related to the configuration and general infrastructure support, such as ViewResolver or beans with context:component-scan.

  • Spring prototype beans: beans with the prototype scope (defined with the scope="prototype" in XML files).

  • Spring bean: other beans defined in XML files.

Filter beans

Use the following tools to filter beans in the tool window:

  • Click Module to show only beans from a particular module. To show beans from multiple modules, click Select.

  • Click Type to filter beans by type. To show multiple types of beans, click Select.

    Filter Spring beans by type
  • Click Options to group beans by module or to show additional beans:

    • Show From Libraries: Include beans defined in libraries (shown in yellow).

    • Show From Tests: Include beans defined in tests (shown in green).

    • Show Implicit Beans: Include implicit beans (service beans implicitly added by Spring libraries).

    • Show XML Infrastructure Beans: Include infrastructure beans (defined in XML files and related to the configuration).

You can customize the colors for library and test beans in the IDE settings (Ctrl+Alt+S), under Appearance & Behavior | File Colors.

Last modified: 08 October 2024