使用温莎城堡时如何导入资源
我想将我的组件保存在一个单独的 xml 文件中以用于生产、开发等。这可以通过 Castle Windsor 来完成吗?
当使用spring.net时,我可以使用
<springDestinations>
<objects xmlns="http://www.springframework.net">
<import resource="file://~/Config/blablabla.xml"/>
</objects>
</springDestinations>
Using Castle Windsor,我有以下组件
<components>
<component id="Retriever" service="Model.Services.Remote.IRetriever, Model" type="Model.Services.Remote.Retriever, Model">
<parameters>
<resourceUrl>http://localhost:8888/Service.svc/</resourceUrl>
</parameters>
</component>
</components>
谢谢:-)
I'd like to hold my components in a separate xml file for production, development etc etc. Can this be done with Castle Windsor?
When using spring.net, i can use
<springDestinations>
<objects xmlns="http://www.springframework.net">
<import resource="file://~/Config/blablabla.xml"/>
</objects>
</springDestinations>
Using Castle Windsor, i have the following components
<components>
<component id="Retriever" service="Model.Services.Remote.IRetriever, Model" type="Model.Services.Remote.Retriever, Model">
<parameters>
<resourceUrl>http://localhost:8888/Service.svc/</resourceUrl>
</parameters>
</component>
</components>
Thanks :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您可以使用
元素< /a> 和 XML 配置中的条件注册。Yes, you can use
<include>
elements and conditional registration in your XML configuration.