Visualizing a Spring Application

A big complaint we hear from many developers is that it is often hard to get a high-level view of the beans declared in your application and how they are interrelated. Spring IDE solves this by offering two different views of your configuration: a tree-based view that shows beans along with the properties configured for them, and a graph-based view that shows your beans and their relationships to each other.

Viewing Project Configurations

The first view Spring IDE provides for your application is the tree-based Spring Beans view, which you access by right-clicking the code window for any Spring IDE–managed configuration file and choosing Show In Spring Beans View.

The Spring Beans view, as shown in Figure C-17, provides a tree-based view of all beans across the configuration files and Config Sets for your application.

image from book
Figure C-17: Using the Spring Beans view

This view provides you with a mechanism you can use to assess quickly all the beans configured for your application and the values assigned to them. You can collapse each bean node in the tree to show the properties configured for that bean, along with the values provided.

Viewing the Bean Graph

The Spring Beans view is great for seeing what beans you have configured and what values have been configured for your bean properties, but it is not so good at showing how the beans are interrelated. For this, you need the Bean Graph view. You can activate the Bean Graph view by right-clicking a file or Config Set in the Spring Beans view and choosing Show Graph from the context menu. Figure C-18 shows the Bean Graph for the SpringBlog application.

image from book
Figure C-18: The SpringBlog Bean Graph

As you can see, the Bean Graph shows each bean as a rectangular block with the names of configured properties listed in the lower region. Dependencies between beans are represented by arrows, with the arrow pointing from the dependent bean to the dependency. This view provides you with a good overview of your application, and it is often useful for providing developers who are new to the project with an overview of how all the beans in your application interact.



Pro Spring
Pro Spring
ISBN: 1590594614
EAN: 2147483647
Year: 2006
Pages: 189

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net