Expert Spring MVC and Web Flow

(Dana P.) #1
Figure A-1.BeanDoc output of the JPetStore sample

If your context consists of multiple XML files, as it usually will, BeanDoc will aggregate
them into a consolidated graph (as shown in Figure A-1) and provide links to the documenta-
tion for each individual context file. The individual documentation pages have graphs of just
the beans in that file. Clicking a graph will reveal it at full size, and each bean on the graph can
be clicked to link to the documentation fragment for that bean.

Installing and Building BeanDoc


BeanDoc is a source-only download, so you’ll have to compile and build it. For this, you will
need Ant (which you will doubtless already have if you are a Java developer who has not been
living on the moon for the last ten years) or Maven. From the main site for BeanDoc you can
download the latest version and extract it to your hard drive. Alternatively, if you’re comfort-
able with CVS, you can check out the sources from the main Spring repository at SourceForge
under the module name spring-beandoc.
Having acquired a release version or CVS snapshot, the next task is to build the JAR file.
BeanDoc is a small utility, so this doesn’t take long. Using Ant, simply run the disttarget from
the root of the main spring-beandocdirectory that you extracted the file to. If Maven is your
thing, run maven install:jarfrom the project root instead.
If you want to enable the graphs you will additionally need to download and install a
version of Graphviz suitable for your platform. Its website offers details, but this is a very
straightforward procedure.

372 APPENDIX A ■DOCUMENTING YOUR MVC APPLICATION

584X_Ch13_AppA_FINAL 1/30/06 1:13 PM Page 372

Free download pdf