<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

<beans>

	<!-- Simple target -->
	<bean id="test" class="test.beans.TestBean">	
		<property name="name"><value>custom</value></property>
		<property name="age"><value>666</value></property>
	</bean>

	<bean id="nopInterceptor" class="test.aop.SerializableNopInterceptor"/>

	<bean id="settersAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
		<property name="advice"><ref local="nopInterceptor"/></property>
		<property name="pattern">
			<value>
				.*set.*
			</value>
		</property>
	</bean>

	<bean id="settersAdvised" class="org.springframework.aop.framework.ProxyFactoryBean">
		<property name="proxyInterfaces"><value>test.beans.ITestBean</value></property>		
		<property name="target"><ref local="test"/></property>
		<property name="interceptorNames"><value>settersAdvisor</value></property>		
	</bean>

	<bean id="serializableSettersAdvised" class="org.springframework.aop.framework.ProxyFactoryBean">
		<property name="proxyInterfaces"><value>test.beans.Person</value></property>
		<property name="target">
			<bean class="test.beans.SerializablePerson">
				<property name="name"><value>serializableSettersAdvised</value></property>
			</bean>
		</property>
		<property name="interceptorNames"><value>settersAdvisor</value></property>	
	</bean>

	<!-- Illustrates use of multiple patterns -->
	<bean id="settersAndAbsquatulateAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
		<property name="advice"><ref local="nopInterceptor"/></property>
		<property name="patterns">
			<list>
				<value>.*get.*</value>
				<value>.*absquatulate</value>
			</list>
		</property>
	</bean>

	<bean id="settersAndAbsquatulateAdvised" class="org.springframework.aop.framework.ProxyFactoryBean">
		<property name="proxyInterfaces"><value>test.beans.ITestBean</value></property>		
		<!-- Force CGLIB so we can cast to TestBean -->
		<property name="proxyTargetClass"><value>true</value></property>
		<property name="target"><ref local="test"/></property>	
		<property name="interceptorNames"><value>settersAndAbsquatulateAdvisor</value></property>		
	</bean>

</beans>		
