Mike R
Mike R

Reputation: 4538

How can I view the Bean Graph for @Autowired beans in Spring STS?

I am able to view the Bean Graph for any beans wired through XML, but when I have beans that are @Autowired through annotations, it doesn't show any arrows between them.


According to STS #171 and STS #1066 it was implemented a long time ago.

Note: Last tested with STS 3.4.0.RELEASE


If I deploy to tcServer and do Live Bean Graph, then it works, but not using regular view.

Upvotes: 8

Views: 2793

Answers (2)

Peter
Peter

Reputation: 616

The improvement feature was requested and even closed; but new tickets still say that feature is requested - and not closed yet even (STS-2396) in 2.8. I haven't succeeded getting there. No joy :(

Issue says - "When STS is resolving autowired beans for either validation purposes or for the bean graph, it seems to only to be able to find beans that have their type explicitly defined."

Upvotes: 1

Dev707
Dev707

Reputation: 69

If you are using Spring boot you can use spring acutator to view all the beans..

Spring acutator enables /beans endpoint which shows all beans in JSON format.

Once you start the Spring boot app all you need to do is http://localhost:8080/beans

Upvotes: 0

Related Questions