如何使用 Spring.NET IoC 获得依赖关系的图形表示?
我正在使用 Spring.NET 的 IoC 容器,一切都工作得很好......直到现在。不知何故,在我们之前的版本之一中,我们引入了循环依赖。由于我们使用基于 setter 的注入而不是基于构造函数的注入,Spring.NET 一直运行良好,但我们应用程序的行为发生了变化。
现在我有一个包含大约一百个组件的解决方案,并且在那堆组件中的某个地方存在循环依赖项,我现在需要找到它。
是否有任何工具可以获取我的 Spring.NET 配置文件并为我提供组件及其依赖项的图形化图片?
I'm using Spring.NET's IoC container and everything has been working just fine....until now. Somehow, in one of our previous releases, we introduced a circular dependency. Since we use setter based injection as opposed to constructor based injection, Spring.NET just kept humming along fine, but the behavior of our app changed.
Now I have a solution with a hundred or so components, and somewhere in that pile of components exists a circular dependency, which I now need to find.
Are there any tools that can take my Spring.NET config files and give me a graphical picture of my components and their dependencies?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AFAIK 没有这样一个可用的工具,尽管有一个适用于 Java 的 spring 的工具。
此 spring.net 论坛上的帖子
讨论该问题并提出解决方案。
我根据 Thomas Darimont 的方法,使用 QuickGraph 进行了快速而简单的概念证明。
对于以下配置文件:
我能够创建以下点文件:
其中显示循环依赖。
该代码作为要点提供。
AFAIK there isn't such a tool available, although there is one for spring for Java.
This thread on the spring.net forum
discusses the issue and proposes a solution.
I made a quick-and-dirty proof of concept based on Thomas Darimont's approach using QuickGraph.
For the following configuration file:
I was able to create the following dot file:
Which shows the circular dependency.
The code is available as a gist.