1

Is there any way to construct Spring's bean dependency graph without doing refresh() to a context? By using the BeanDefinitions gathered by the Spring Readers or so

I want to build the dependency graph for an application with the minimum waste of memory/time.

Thanks!

1 Answers1

-1

Java IDEs have support to draw spring dependency graph either innately or via plug-ins.

  • In eclipse, with Spring Source Tool Suite installed, you could view dependency graph by selecting spring configuration (xml) files in Spring Explorer view and right-clicking and selecting "Open dependency graph".

  • In IntelliJ IDEA, you could view it by right clicking the configuration files and selecting Diagrams -> Show Diagram.

kuriouscoder
  • 5,394
  • 7
  • 26
  • 40
  • 1
    I know that options. But what I want to do is build the graph programatically (so far I've tried to do it with Spring code, but for gathering all the information it requires me to get a context up) so I can query it. – Ivan Postolski Dec 24 '14 at 21:48
  • Why don't you look at Spring Source Tool suite source code then? – kuriouscoder Dec 25 '14 at 01:50
  • I could but dig into the code of a open source tool to find a quite theoretical question about Spring sounds like an overkill. – Ivan Postolski Dec 26 '14 at 15:00