Is there a tool to generate diagram/graph of Spring application context?
The tool should take into consideration also annotation driven configuration (like @Autowired).
The tool may generate the dependency diagram by 'dumping' BeanDefinitions in runtime. I.e. I don't require the tool to make static code analysis.
Spring diagrams help you analyze dependencies in your application. You can double-click a bean or a file on a diagram to open it in a dedicated tab in the editor. For Spring Boot, you can also build the Runtime Beans diagram. Spring Beans Dependencies diagram
Use the Spring Application Context Dependencies diagram to view dependencies between multiple configuration files and analyze how they include and reference each other. Red arrows on the diagram mark errors (such as circular dependencies) to easily spot and remove them from your Spring configuration.
A dependency graph is a graph with directed edges that represent the relationship existing between vertices. Its typical usage consists of describing processes, such as those in the development of software; or relationships, such as those contained in a knowledge graph.
From the context menu, select Diagrams | Show Diagram Ctrl+Alt+Shift+U. This opens the diagram in a separate editor tab. To open it in a popup window, select Diagrams | Show Diagram Popup Ctrl+Alt+U. In the Select Diagram Type popup menu, click Spring Beans Dependencies.
The Spring IDE + Eclipse or the Spring Source Tool Suite can generate simple graphs of your dependencies.
To do that open the view called "Spring Explorer" and choose your project. Then click right mouse -> Properties and combine some/all of your context files into a "Config Set". After saving you can right click on it in the Spring Explorer and choose "Open dependency graph".
The graph is static and quite untidy, but this might help.
IntelliJ IDEA's Ultimate Edition can generate a Spring dependency graph. Basically, right click on the file name and select Diagrams -> Show Diagram
. This web page provides the details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With