Package org.springframework.aop.config
Class AopNamespaceHandler
- java.lang.Object
- org.springframework.beans.factory.xml.NamespaceHandlerSupport
- org.springframework.aop.config.AopNamespaceHandler
- All Implemented Interfaces:
NamespaceHandler
public class AopNamespaceHandler extends NamespaceHandlerSupport
NamespaceHandlerfor theaopnamespace.Provides a
BeanDefinitionParserfor the<aop:config>tag. Aconfigtag can include nestedpointcut,advisorandaspecttags.The
pointcuttag allows for creation of namedAspectJExpressionPointcutbeans using a simple syntax:<aop:pointcut id="getNameCalls" expression="execution(* *..ITestBean.getName(..))"/>
Using the
advisortag you can configure anAdvisorand have it applied to all relevant beans in youBeanFactoryautomatically. Theadvisortag supports both in-line and referencedPointcuts:<aop:advisor id="getAgeAdvisor" pointcut="execution(* *..ITestBean.getAge(..))" advice-ref="getAgeCounter"/> <aop:advisor id="getNameAdvisor" pointcut-ref="getNameCalls" advice-ref="getNameCounter"/>- Since:
- 2.0
- Author:
- Rob Harrop, Adrian Colyer, Juergen Hoeller
Constructor Summary
Constructors Constructor Description AopNamespaceHandler()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit()Register theBeanDefinitionParsersfor the 'config', 'spring-configured', 'aspectj-autoproxy' and 'scoped-proxy' tags.Methods inherited from class org.springframework.beans.factory.xml.NamespaceHandlerSupport
decorate, parse, registerBeanDefinitionDecorator, registerBeanDefinitionDecoratorForAttribute, registerBeanDefinitionParser
Constructor Detail
AopNamespaceHandler
public AopNamespaceHandler()
Method Detail
init
public void init()
Register theBeanDefinitionParsersfor the 'config', 'spring-configured', 'aspectj-autoproxy' and 'scoped-proxy' tags.