使用温莎城堡时如何导入资源

发布于 2024-08-29 04:25:38 字数 733 浏览 7 评论 0原文

我想将我的组件保存在一个单独的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁对谁错谁最难过 2024-09-05 04:25:38

Yes, you can use <include> elements and conditional registration in your XML configuration.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文