22

Are there any tools that can take a fully-constructed/wired Spring application context and export a visualization of it? I'm talking about a live context that shows the order in which aspects were applied, what beans were auto-wired into other beans, etc.

I know it can be done with the context files themselves (re: Spring IDE). However, I believe the new annotation-driven paradigm defeats this approach.

An Eclipse plug-in or command-line solution is preferred, but I'd also be interested to see if anything like this exists at all.

Brian Laframboise
  • 5,464
  • 2
  • 28
  • 32
  • It's a cool idea. With some swift AOP you could probably gin up a snazzy real time display of what's going on in the app context. I will keep an eye on this question. – Nicholas Jan 08 '09 at 22:10

5 Answers5

2

I am looking for the same tool. Unfortunately, I do not see any other possibility than to wait for Spring 3.2 where should be that feature. See https://jira.springsource.org/browse/SPR-9662

banterCZ
  • 1,321
  • 1
  • 19
  • 35
2

As a follow up to banterCZ's answer, the Live Beans Graph in Spring Tool Suite 3.2.0 now does almost exactly what you're after, though without export capabilities.

See the STS v3.2.0 New and Noteworthy page.

Community
  • 1
  • 1
mdjnewman
  • 156
  • 1
  • 9
2

I have written an ApplicationContextDumper to dump live spring application context into log. It shows autowired beans and beans loaded by component scan, but can't show which aspect is applied.

Source code and example in https://gist.github.com/aleung/1347171

David Newcomb
  • 10,026
  • 3
  • 42
  • 56
aleung
  • 7,829
  • 3
  • 49
  • 63
0

Are you looking for something like bean graph? It is part of spring ide and can be generated at the project level.

neesh
  • 4,768
  • 6
  • 27
  • 31
  • That's what I referred to above. It's a great tool, but I just checked and while it will display automatically created beans, it doesn't visualize what *will be auto-wired into them*, which for me is much more interesting. Perhaps I'll post to the Spring forums. – Brian Laframboise Jan 08 '09 at 21:58
  • Sorry, I am not sure what you mean by "what will be auto-wired into them". The arrows in the bean graph depict interdependencies between beans and what is auto-wired by the spring container. What am I missing? – neesh Jan 09 '09 at 22:20
  • 1
    Running the Sprint IDE graph tool on a sample project, it visualized Controller beans that would be automatically detected and instantiated, but it did not display Service beans that would be instantiated and autowired into that Controller bean. That's what I want. – Brian Laframboise Jan 12 '09 at 20:13
0

Perhaps you find something with JXInsight http://www.jinspired.com/products/jxinsight/ They seem to have a Spring Extension and they can probably show object graph visualizations.

mhaller
  • 13,702
  • 1
  • 39
  • 61