程序包 infra.aop.config

类 AopNamespaceHandler

java.lang.Object
infra.beans.factory.xml.NamespaceHandlerSupport
infra.aop.config.AopNamespaceHandler
所有已实现的接口:
infra.beans.factory.xml.NamespaceHandler

public class AopNamespaceHandler extends infra.beans.factory.xml.NamespaceHandlerSupport
NamespaceHandler for the aop namespace.

Provides a BeanDefinitionParser for the <aop:config> tag. A config tag can include nested pointcut, advisor and aspect tags.

The pointcut tag allows for creation of named AspectJExpressionPointcut beans using a simple syntax:

 <aop:pointcut id="getNameCalls" expression="execution(* *..ITestBean.getName(..))"/>
 

Using the advisor tag you can configure an Advisor and have it applied to all relevant beans in you BeanFactory automatically. The advisor tag supports both in-line and referenced Pointcuts:

 <aop:advisor id="getAgeAdvisor"
     pointcut="execution(* *..ITestBean.getAge(..))"
     advice-ref="getAgeCounter"/>

 <aop:advisor id="getNameAdvisor"
     pointcut-ref="getNameCalls"
     advice-ref="getNameCounter"/>
从以下版本开始:
4.0 2022/3/7 21:46
作者:
Rob Harrop, Adrian Colyer, Juergen Hoeller, Harry Yang
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Register the BeanDefinitionParsers for the 'config', 'configured', 'aspectj-autoproxy' and 'scoped-proxy' tags.

    从类继承的方法 infra.beans.factory.xml.NamespaceHandlerSupport

    decorate, parse, registerBeanDefinitionDecorator, registerBeanDefinitionDecoratorForAttribute, registerBeanDefinitionParser

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • AopNamespaceHandler

      public AopNamespaceHandler()
  • 方法详细资料

    • init

      public void init()
      Register the BeanDefinitionParsers for the 'config', 'configured', 'aspectj-autoproxy' and 'scoped-proxy' tags.