ProxyFactoryBeanTests-notlast-targetsource.xml 1.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
<?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">

<!--
	Tests for misconfiguring the proxy factory bean using a target source in the
	interceptor list as well as set by the targetSource property
-->	

<beans>
	
	
P
Phillip Webb 已提交
12
	<bean id="adam" class="org.springframework.tests.sample.beans.TestBean">
13 14 15 16
		<property name="name"><value>Adam</value></property>
	</bean>
	
	<bean id="countingBeforeAdvice"
P
Phillip Webb 已提交
17
		class="org.springframework.tests.aop.advice.CountingBeforeAdvice"
18 19 20 21 22 23 24 25
	/>
	
	<!--
       An error, as the target source or non-advice object
       must be last
    --> 
	<bean id="targetSourceNotLast" 
		class="org.springframework.aop.framework.ProxyFactoryBean"> 
P
Phillip Webb 已提交
26
		<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
27 28 29 30 31 32 33
		<!-- this is the one used and NOT the one set by targetSource -->
		<property name="interceptorNames"><value>adam,countingBeforeAdvice</value></property>
		
	</bean>
		
</beans>		
	
34