简体   繁体   English

如何在不刷新上下文的情况下构造Spring的依赖图?

[英]How to construct Spring's dependency graph without refreshing the context?

Is there any way to construct Spring's bean dependency graph without doing refresh() to a context? 有什么方法可以在不对上下文进行refresh()的情况下构造Spring的bean依赖图? By using the BeanDefinitions gathered by the Spring Readers or so 通过使用Spring Readers收集的BeanDefinitions左右

I want to build the dependency graph for an application with the minimum waste of memory/time. 我想以最小的内存/时间浪费为应用程序构建依赖关系图。

Thanks! 谢谢!

Java IDEs have support to draw spring dependency graph either innately or via plug-ins. Java IDE支持通过固有方式或通过插件绘制spring依赖关系图。

  • 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". 在eclipse中,安装了Spring Source Tool Suite后,您可以通过在Spring Explorer视图中选择spring配置(xml)文件并右键单击并选择“打开依赖关系图”来查看依赖关系图。

  • In IntelliJ IDEA, you could view it by right clicking the configuration files and selecting Diagrams -> Show Diagram. 在IntelliJ IDEA中,可以通过右键单击配置文件并选择Diagrams-> Show Diagram来查看它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM