AdvisorAutoProxyCreatorTests-quick-targetsource.xml 1.6 KB
Newer Older
1
<?xml version="1.0" encoding="UTF-8"?>
S
Spring Operator 已提交
2
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "https://www.springframework.org/dtd/spring-beans-2.0.dtd">
3 4 5 6 7 8

<beans>

	<bean id="aapc" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
		<property name="customTargetSourceCreators">
			<list>
9
				<ref bean="aapc.quickTargetSourceCreator"/>
10 11 12
			</list>
		</property>
	</bean>
13

14 15 16
	<bean id="aapc.quickTargetSourceCreator"
		class="org.springframework.aop.framework.autoproxy.target.QuickTargetSourceCreator"/>

P
Phillip Webb 已提交
17
	<bean id="test" scope="prototype" class="org.springframework.tests.sample.beans.TestBean">
18
		<property name="name"><value>Rod</value></property>
19
		<property name="spouse"><ref bean="wife"/></property>
20
	</bean>
21

P
Phillip Webb 已提交
22
	<bean id="wife" class="org.springframework.tests.sample.beans.TestBean">
23 24
		<property name="name"><value>Kerry</value></property>
	</bean>
25

26
	<!-- Prefix means it will be pooled -->
P
Phillip Webb 已提交
27
	<bean id=":test" class="org.springframework.tests.sample.beans.TestBean">
28
		<property name="name"><value>Rod</value></property>
29
		<property name="spouse"><ref bean="wife"/></property>
30
	</bean>
31

32
	<!-- Prefix means it will be thread local -->
P
Phillip Webb 已提交
33
	<bean name="%test" scope="prototype" class="org.springframework.tests.sample.beans.TestBean">
34
		<property name="name"><value>Rod</value></property>
35
		<property name="spouse"><ref bean="wife"/></property>
36
	</bean>
37

38
	<!-- Prefix means it will be a prototype target source -->
P
Phillip Webb 已提交
39
	<bean name="!test" scope="prototype" class="org.springframework.tests.sample.beans.TestBean">
40
		<property name="name"><value>Rod</value></property>
41
		<property name="spouse"><ref bean="wife"/></property>
42 43
	</bean>

44
</beans>