首页 > 代码库 > spring.net 配置文件需要注意换行问题

spring.net 配置文件需要注意换行问题

今天在做Spring.NET Demo时写配置文件写ObjectNames 节点的Value成这样

 <object id="ProxyCreator" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator, Spring.Aop">        <property name="ObjectNames">          <list>            <value>            *Service           </value>          </list>        </property>        <property name="InterceptorNames">          <list>            <value>aroundAdvisor</value>          </list>        </property>      </object>

导致输出aroundAdvice方法执行不到

正确的写法就是value的值不换行,运行,可以正常执行

<object id="ProxyCreator" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator, Spring.Aop">        <property name="ObjectNames">          <list>            <value>*Service</value>          </list>        </property>        <property name="InterceptorNames">          <list>            <value>aroundAdvisor</value>          </list>        </property>      </object>

 

spring.net 配置文件需要注意换行问题