<?
xml version="1.0" encoding="UTF-8"
?>
< beans xmlns ="http://www.springframework.org/schema/beans"
xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation ="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" >
< bean id ="logBeforeAdvice" class ="com.hwp.aop.pa.BeforeAdviceDemo" />
< bean id ="helloAdvisor"
class ="org.springframework.aop.support.NameMatchMethodPointcutAdvisor" >
< property name ="mappedName" value ="hello*" />
< property name ="advice" ref ="logBeforeAdvice" />
</ bean >
< bean id ="helloSpeaker" class ="com.hwp.aop.pa.HelloSpeaker" />
< bean id ="helloProxy"
class ="org.springframework.aop.framework.ProxyFactoryBean" >
< property name ="proxyInterfaces" value ="com.hwp.aop.pa.IHello" />
< property name ="target" ref ="helloSpeaker" />
< property name ="interceptorNames" >
< list >
< value > helloAdvisor </ value >
</ list >
</ property >
</ bean >
</ beans >
< beans xmlns ="http://www.springframework.org/schema/beans"
xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation ="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" >
< bean id ="logBeforeAdvice" class ="com.hwp.aop.pa.BeforeAdviceDemo" />
< bean id ="helloAdvisor"
class ="org.springframework.aop.support.NameMatchMethodPointcutAdvisor" >
< property name ="mappedName" value ="hello*" />
< property name ="advice" ref ="logBeforeAdvice" />
</ bean >
< bean id ="helloSpeaker" class ="com.hwp.aop.pa.HelloSpeaker" />
< bean id ="helloProxy"
class ="org.springframework.aop.framework.ProxyFactoryBean" >
< property name ="proxyInterfaces" value ="com.hwp.aop.pa.IHello" />
< property name ="target" ref ="helloSpeaker" />
< property name ="interceptorNames" >
< list >
< value > helloAdvisor </ value >
</ list >
</ property >
</ bean >
</ beans >