今天在做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>
时间: 2024-12-29 06:39:50