The Spring Framework provides an excellent infrastructure for wiring together applications (it provides a lot more than just that, but the wiring is what I'm interested in here). Wiring an application together with Spring involves maintaining XML files. Unfortunately, the XML can grow to be rather large, making a visualization tool desirable. SpringViz (previously known as SpringGraph, but renamed due to a conflict with a pre-existing Perl utility) provides that tool, although I hesitate to call it a "tool", since it's just an XSLT.
Example Spring configuration graph from "jpetstore" sample
SpringViz uses XSLT to generate a "dot" notation file displayable by Graphviz. Graphviz provides high-quality display and export of "dot" files. You'll need to download Graphviz for your platform.
The below is a graph of my current project's Spring configuration. It's huge, so it's obviously unreadable here (see the PDF), but you get the idea.
Graph from my current project [PDF]
| Version | Notes | Download |
|---|---|---|
| Major contributions by Erik Doernenburg: mainly support for multiple context files, and now compatible with XML schema-based spring configs. Thanks Erik! | ||
| Added handling for Spring 1.2 "condensed" property declarations. Added a property for output directory and a target to call dot and open a viewer (thanks Dimitri B. and William P.) | ||
| Renamed project and jar file. | ||
| Refactored XSLT to use "xsl:choose" instruction, rather than "xsl:if" (thanks to Iouri). | ||
| Refactored the XSLT to improve structure (hopefully). Output changes: now "colorized", "local" refs are solid lines, "bean" refs are dotted lines, singletons are double-boxed, font is now helvetica, jar name change. | ||
| First, unsteady steps. |
Back to Software