Spring.Net 本质就是一个抽象工厂。容器(IApplicationContext)通过配置创建一个对象。

1.创建对象(IoC)

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <sectionGroup name="spring">
      <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
      <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
    </sectionGroup>
  </configSections>
  <spring>
    <context>
      <resource uri="config://spring/objects"/>
    </context>
    <objects xmlns="http://www.springframework.net">
      <description>An  example that demonstrates simple IoC features.</description>
    </objects>
  </spring>
</configuration>
初始化容器配置

相关文章:

  • 2021-07-05
  • 2021-07-20
  • 2021-10-26
  • 2021-10-11
  • 2022-12-23
  • 2021-11-30
  • 2021-06-22
  • 2022-01-27
猜你喜欢
  • 2021-11-01
  • 2021-11-01
  • 2022-12-23
  • 2021-07-12
  • 2021-10-12
  • 2021-08-09
相关资源
相似解决方案