1

我将 Spring.Net 用于 IOC 和 AOP。似乎 Spring.Net 不支持多个 AutoProxyCreators。我有以下课程:

[Facade]
public abstract class AbstractFacade{
}

[TransactionSupportFacade]
public abstract class AbstractTransactionSupportFacade{
}

有些类是从上面的类继承的,我有以下 xml 配置:

  <object type="Spring.Aop.Framework.AutoProxy.AttributeAutoProxyCreator , Spring.Aop">
    <property name="AttributeTypes">
      <list>
        <value>Common.Attributes.TransactionSupportFacadeAttribute, Common</value>
      </list>
    </property>
    <property name="InterceptorNames">
      <list>
        <value>JUTransactionInterceptor</value>
      </list>
    </property>
    <property name="CheckInherited">
      <value>true</value>
    </property>
  </object>

  <object type="Spring.Aop.Framework.AutoProxy.AttributeAutoProxyCreator , Spring.Aop">
    <property name="AttributeTypes">
      <list>
        <value>Common.Attributes.FacadeAttribute, Common</value>
      </list>
    </property>
    <property name="InterceptorNames">
      <list>
        <value>IdentifyServiceAspect</value>
        <value>PushIdentityAspect</value>
        <value>AuthenticationAdvice</value>
        <value>ValidationAspect</value>
        <value>ServiceCallResultWrapperAspect</value>
      </list>
    </property>
    <property name="CheckInherited">
      <value>true</value>
    </property>
  </object>

问题在这里提出,这些 AttributeAutoProxyCreators 中只有一个同时工作,请帮我解决这个问题。

4

0 回答 0