Is there tooling to visualize a live Spring applic

2019-03-09 02:30发布

问题:

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.

回答1:

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



回答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.



回答3:

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



回答4:

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



回答5:

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.