Harmonize resources location

Issue: SPR-12766
This commit is contained in:
Stephane Nicoll
2015-02-28 10:32:34 +01:00
parent 23d52d5e35
commit babbf6e871
545 changed files with 5 additions and 21 deletions

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="afterAdviceBindingTests" ref="testAspect">
<aop:after method="oneIntArg" pointcut="execution(* setAge(int)) and args(age)"/>
<aop:after method="oneObjectArg" pointcut="execution(* getAge()) and this(bean)"/>
<aop:after method="oneObjectArg" pointcut="execution(* getDoctor()) and target(bean)"/>
<aop:after method="oneIntAndOneObject"
pointcut="execution(* setAge(..)) and args(age) and this(bean)" arg-names="age,bean"/>
<aop:after method="needsJoinPoint" pointcut="execution(* getAge())"/>
<aop:after method="needsJoinPointStaticPart" pointcut="execution(* getAge())"/>
</aop:aspect>
</aop:config>
<bean id="testAspect" class="org.springframework.aop.aspectj.AdviceBindingTestAspect"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="afterReturningAdviceBindingTests" ref="testAspect">
<aop:after-returning method="oneIntArg" pointcut="execution(* setAge(int)) and args(age)"/>
<aop:after-returning method="oneObjectArg" pointcut="execution(* getAge()) and this(bean)"/>
<aop:after-returning method="oneIntAndOneObject"
pointcut="execution(* setAge(..)) and args(age) and this(bean)" arg-names="age,bean"/>
<aop:after-returning method="needsJoinPoint" pointcut="execution(* getAge())"/>
<aop:after-returning method="needsJoinPointStaticPart" pointcut="execution(* getAge())"/>
<!-- additional tests using the returning attribute -->
<aop:after-returning method="oneString" returning="name" pointcut="execution(* getName())"/>
<aop:after-returning method="oneObjectArg" returning="bean" pointcut="execution(* returnsThis())"/>
<aop:after-returning method="oneTestBeanArg" returning="bean" pointcut="execution(* returnsThis())"/>
<aop:after-returning method="testBeanArrayArg" returning="beans"
pointcut="execution(org.springframework.tests.sample.beans.ITestBean[] *(..))"/>
<aop:after-returning method="oneString" returning="name" pointcut="execution(* getSpouse())"/>
<aop:after-returning method="objectMatchNoArgs" returning="java.lang.Object"
pointcut="execution(* returnsThis())"/>
<aop:after-returning method="stringMatchNoArgs" returning="java.lang.String"
pointcut="execution(* getSpouse())"/>
<aop:after-returning method="oneInt" returning="result" pointcut="execution(* haveBirthday())"/>
</aop:aspect>
</aop:config>
<bean id="testAspect" class="org.springframework.aop.aspectj.AfterReturningAdviceBindingTestAspect"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="afterThrowingAdviceBindingTests" ref="testAspect">
<aop:after-throwing
method="noArgs"
pointcut="execution(* exceptional(..))"
/>
<aop:after-throwing
method="oneThrowable"
throwing="t"
pointcut="execution(* exceptional(..))"
/>
<aop:after-throwing
method="oneRuntimeException"
throwing="ex"
pointcut="execution(* exceptional(..))"
/>
<aop:after-throwing
method="noArgsOnThrowableMatch"
throwing="java.lang.Throwable"
pointcut="execution(* exceptional(..))"
/>
<aop:after-throwing
method="noArgsOnRuntimeExceptionMatch"
throwing="java.lang.RuntimeException"
pointcut="execution(* exceptional(..))"
/>
</aop:aspect>
</aop:config>
<bean id="testAspect" class="org.springframework.aop.aspectj.AfterThrowingAdviceBindingTestAspect"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="beforeAdviceBindingTests" ref="testAspect">
<aop:around method="oneIntArg" pointcut="execution(* setAge(int)) and args(age)" />
<aop:around method="oneObjectArg" pointcut="execution(* getAge()) and target(bean)"/>
<aop:around method="oneIntAndOneObject"
pointcut="execution(* setAge(..)) and args(age) and this(bean)" arg-names="thisJoinPoint,age,bean"/>
<aop:around method="justJoinPoint" pointcut="execution(* getAge())"/>
</aop:aspect>
</aop:config>
<bean id="testAspect" class="org.springframework.aop.aspectj.AroundAdviceBindingTestAspect"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="beforeAdviceBindingTests" ref="testAspect">
<aop:around method="oneIntArg" pointcut="execution(* setAge(int)) and args(age)" />
<aop:around method="oneObjectArg" pointcut="execution(* getAge()) and target(bean)"/>
<aop:around method="oneIntAndOneObject"
pointcut="execution(* setAge(..)) and args(age) and this(bean)" arg-names="thisJoinPoint,age,bean"/>
<aop:around method="justJoinPoint" pointcut="execution(* getAge())"/>
</aop:aspect>
</aop:config>
<bean id="testAspect" class="org.springframework.aop.aspectj.AroundAdviceBindingTestAspect"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean">
<property name="spouse" ref="testBean2"/>
</bean>
<bean id="testBean2" class="org.springframework.tests.sample.beans.TestBean" autowire-candidate="false">
<property name="spouse" ref="testBean"/>
</bean>
</beans>

View File

@@ -1,90 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:advisor id="lowPrecedenceAdvisor"
advice-ref="lowPrecedenceSpringAdvice"
pointcut="execution(* getAge(..))"
order="900"/>
<aop:advisor id="highPrecedenceAdvisor"
advice-ref="highPrecedenceSpringAdvice"
pointcut="execution(* getAge(..))"
order="90"/>
<aop:aspect ref="lowPrecedenceAspect" order="1000">
<aop:before
method="beforeAdviceOne"
pointcut="execution(* getAge())"/>
<aop:before
method="beforeAdviceTwo"
pointcut="execution(* getAge())"/>
<aop:around
method="aroundAdviceOne"
pointcut="execution(* getAge())"/>
<aop:around
method="aroundAdviceTwo"
pointcut="execution(* getAge())"/>
<aop:after-returning
method="afterAdviceOne"
pointcut="execution(* getAge())"/>
<aop:after-returning
method="afterAdviceTwo"
pointcut="execution(* getAge())"/>
</aop:aspect>
<aop:aspect ref="highPrecedenceAspect">
<aop:before
method="beforeAdviceOne"
pointcut="execution(* getAge())"/>
<aop:before
method="beforeAdviceTwo"
pointcut="execution(* getAge())"/>
<aop:around
method="aroundAdviceOne"
pointcut="execution(* getAge())"/>
<aop:around
method="aroundAdviceTwo"
pointcut="execution(* getAge())"/>
<aop:after-returning
method="afterAdviceOne"
pointcut="execution(* getAge())"/>
<aop:after-returning
method="afterAdviceTwo"
pointcut="execution(* getAge())"/>
</aop:aspect>
</aop:config>
<bean id="highPrecedenceSpringAdvice" class="org.springframework.aop.aspectj.SimpleSpringBeforeAdvice"/>
<bean id="lowPrecedenceSpringAdvice" class="org.springframework.aop.aspectj.SimpleSpringBeforeAdvice"/>
<bean id="highPrecedenceAspect" class="org.springframework.aop.aspectj.PrecedenceTestAspect">
<property name="order" value="10"/>
</bean>
<bean id="lowPrecedenceAspect" class="org.springframework.aop.aspectj.PrecedenceTestAspect"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -1,18 +0,0 @@
<?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>
<bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="advisor" class="org.springframework.aop.aspectj.AspectJExpressionPointcutAdvisor">
<property name="expression"
value="execution(org.springframework.tests.sample.beans.ITestBean[] org.springframework.tests.sample.beans.ITestBean.*(..))"/>
<property name="advice" ref="interceptor"/>
</bean>
<bean id="interceptor" class="org.springframework.aop.aspectj.CallCountingInterceptor"/>
</beans>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy/>
<bean id="testBean1" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="testBean2" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="testBean3" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="counterAspect" class="org.springframework.aop.aspectj.CounterAspect"/>
</beans>

View File

@@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="beanNameMatchingTest" ref="counterAspect">
<aop:pointcut id="bean1Operation" expression="execution(* set*(..)) and bean(myBean) and !bean(foo)"/>
<aop:before pointcut-ref="bean1Operation" method="increment()"/>
<aop:pointcut id="nestedBeanOperation" expression="execution(* getCompany(..)) and bean(testBean*)"/>
<aop:before pointcut-ref="nestedBeanOperation" method="increment()"/>
<aop:pointcut id="factoryBean1Operation" expression="bean(testFactoryBean1)"/>
<aop:before pointcut-ref="factoryBean1Operation" method="increment()"/>
<aop:pointcut id="factoryBean2Operation" expression="bean(&amp;testFactoryBean2)"/>
<aop:before pointcut-ref="factoryBean2Operation" method="increment()"/>
</aop:aspect>
</aop:config>
<bean id="testBean1" name="myBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="testBean2" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="testBeanContainingNestedBean" class="org.springframework.tests.sample.beans.TestBean">
<property name="doctor">
<bean class="org.springframework.tests.sample.beans.NestedTestBean"/>
</property>
</bean>
<bean id="testFactoryBean1" class="org.springframework.beans.factory.config.MapFactoryBean">
<property name="sourceMap">
<map>
<entry key="myKey" value="myValue"/>
</map>
</property>
</bean>
<bean id="testFactoryBean2" class="org.springframework.beans.factory.config.MapFactoryBean">
<property name="sourceMap">
<map>
<entry key="myKey" value="myValue"/>
</map>
</property>
</bean>
<bean id="counterAspect" class="org.springframework.aop.aspectj.Counter"/>
<aop:config>
<aop:advisor pointcut="bean(*This) and !bean(dont*)" advice-ref="testInterceptor"/>
</aop:config>
<bean id="interceptThis" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="dontInterceptThis" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="testInterceptor" class="org.springframework.aop.aspectj.BeanNamePointcutTests$TestInterceptor"/>
</beans>

View File

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="beforeAdviceBindingTests" ref="testAspect">
<aop:before method="oneIntArg" pointcut="execution(* setAge(int)) and args(age)"/>
<aop:before method="oneObjectArg" pointcut="execution(* getAge()) and this(bean)"/>
<aop:before method="oneIntAndOneObject"
pointcut="execution(* setAge(..)) and args(age) and target(bean)" arg-names="age,bean"/>
<aop:before method="needsJoinPoint" pointcut="execution(* getAge())"/>
<aop:before method="needsJoinPointStaticPart" pointcut="execution(* getAge())"/>
</aop:aspect>
<!-- variation with external pointcut reference -->
<aop:aspect ref="authenticationLogger">
<aop:pointcut id="authenticationMethodWithString"
expression="execution(boolean *..SecurityManager.authenticate(..)) and args(username,java.lang.String)"/>
<aop:before pointcut-ref="authenticationMethodWithString"
method="logAuthenticationAttempt(java.lang.String)"/>
</aop:aspect>
</aop:config>
<bean id="testAspect" class="org.springframework.aop.aspectj.AdviceBindingTestAspect"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="authenticationLogger" class="org.springframework.aop.aspectj.AuthenticationLogger"/>
</beans>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="topsyTurvyAspect" class="org.springframework.aop.aspectj.TopsyTurvyAspect"/>
<bean id="topsyTurvyTarget" class="org.springframework.aop.aspectj.TopsyTurvyTargetImpl"/>
<aop:config>
<aop:aspect id="myAspect" ref="topsyTurvyAspect">
<aop:before pointcut-ref="pc1"
method="before"/>
<aop:declare-parents
types-matching="*..TopsyTurvyTarget+"
implement-interface="java.io.Serializable"
default-impl="org.springframework.aop.aspectj.DeclarationOrderIndependenceTests$SerializableMixin"/>
<aop:after-returning pointcut-ref="pc2" method="afterReturning"/>
<aop:pointcut id="pc1" expression="execution(* *..do*(..))"/>
<aop:around pointcut-ref="pc2"
method="around"/>
<aop:pointcut id="pc2" expression="execution(* *..TopsyTurvyTarget+.get*(..))"/>
<aop:declare-parents
types-matching="*..TopsyTurvyTarget+"
implement-interface="org.springframework.beans.factory.BeanNameAware"
default-impl="org.springframework.aop.aspectj.DeclarationOrderIndependenceTests$BeanNameAwareMixin"/>
</aop:aspect>
</aop:config>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<aop:config>
<aop:aspect id="testAspect">
<aop:declare-parents
types-matching="org.springframework.aop.aspectj.NoMethodsBean+"
implement-interface="org.springframework.aop.aspectj.ICounter"
delegate-ref="counter"
/>
</aop:aspect>
</aop:config>
<bean id="noMethodsBean" class="org.springframework.aop.aspectj.NoMethodsBeanImpl"/>
<bean id="counter" class="org.springframework.aop.aspectj.Counter"/>
</beans>

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="beforeAdviceBindingTests" ref="introduction">
<aop:declare-parents
types-matching="org.springframework.tests.sample.beans..*"
implement-interface="test.mixin.Lockable"
default-impl="test.mixin.DefaultLockable"
/>
<aop:before
method="checkNotLocked"
pointcut="execution(* set*(*)) and this(mixin)"
arg-names="mixin"
/>
</aop:aspect>
</aop:config>
<bean id="introduction" class="org.springframework.aop.aspectj.NonAnnotatedMakeLockable"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="aTestBean"/>
</bean>
<aop:aspectj-autoproxy proxy-target-class="true">
<aop:include name="counterAtAspectJAspect"/>
</aop:aspectj-autoproxy>
<bean id="counterAtAspectJAspect"
class="org.springframework.aop.aspectj.ImplicitJPArgumentMatchingAtAspectJTests$CounterAtAspectJAspect"/>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config proxy-target-class="true">
<aop:aspect ref="counterAspect">
<aop:pointcut id="anyOperation"
expression="execution(* org.springframework.tests.sample.beans.TestBean.*(..)) and this(bean) and args(argument)"/>
<aop:around pointcut-ref="anyOperation" method="increment" arg-names="bean,argument"/>
</aop:aspect>
</aop:config>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="aTestBean"/>
</bean>
<bean id="counterAspect"
class="org.springframework.aop.aspectj.ImplicitJPArgumentMatchingTests$CounterAspect"/>
</beans>

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="ambiguousAdviceTest" ref="testAspect">
<aop:pointcut id="setter" expression="execution(* setName(..)) and args(name)"/>
<aop:before pointcut-ref="setter" method="myBeforeAdvice"/>
</aop:aspect>
</aop:config>
<bean id="testAspect" class="org.springframework.aop.aspectj.OverloadedAdviceTestAspect"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="overloadedAdviceTest" ref="testAspect">
<aop:pointcut id="setter" expression="execution(* setName(..)) and args(name)"/>
<aop:before pointcut-ref="setter" method="myBeforeAdvice(java.lang.String)"/>
<aop:before pointcut-ref="setter" method="myBeforeAdvice(int)"/>
</aop:aspect>
</aop:config>
<bean id="testAspect" class="org.springframework.aop.aspectj.OverloadedAdviceTestAspect"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="aspectOne" ref="firstTestAspect">
<aop:around pointcut="execution(* setName(..)) and args(value)" method="capitalize"/>
<aop:around pointcut="execution(* setAge(..))" method="doubleOrQuits"/>
<aop:around pointcut="execution(* setMyFloat(..)) and args(value)" method="addOne"/>
<aop:before pointcut="execution(* setMyFloat(..)) and args(arg)" method="captureFloatArgument"/>
<aop:around pointcut="execution(* setSex(..)) and args(value)" method="capitalize"/>
</aop:aspect>
<aop:aspect id="aspectTwo" ref="secondTestAspect">
<aop:before pointcut="execution(* setSex(..)) and args(arg)" method="captureStringArgument"/>
<aop:around pointcut="execution(* setSex(..)) and args(arg)" method="captureStringArgumentInAround"/>
</aop:aspect>
</aop:config>
<bean id="testBean" class="org.springframework.aop.aspectj.SimpleBeanImpl"/>
<bean id="firstTestAspect" class="org.springframework.aop.aspectj.ProceedTestingAspect">
<property name="order" value="1"/>
</bean>
<bean id="secondTestAspect" class="org.springframework.aop.aspectj.ProceedTestingAspect">
<property name="order" value="2"/>
</bean>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect ref="monitoringAspect">
<aop:before method="before" pointcut="execution(* increment*())" />
<aop:around method="around" pointcut="execution(* increment*())" />
</aop:aspect>
</aop:config>
<bean id="monitoringAspect" class="org.springframework.aop.aspectj.JoinPointMonitorAspect">
<property name="counter" ref="counter"/>
</bean>
<bean id="counter" class="org.springframework.aop.aspectj.Counter"/>
</beans>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="counter" class="org.springframework.aop.aspectj.Counter"/>
<aop:aspectj-autoproxy/>
<bean id="monitoringAspect" class="org.springframework.aop.aspectj.JoinPointMonitorAtAspectJAspect">
<property name="counter" ref="counter" />
</bean>
</beans>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy/>
<bean id="monitoringAspect"
class="org.springframework.aop.aspectj.JoinPointMonitorAtAspectJAspect">
<property name="counter" ref="counter" />
</bean>
<bean id="counter" class="org.springframework.aop.aspectj.Counter"/>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="counter" class="org.springframework.aop.aspectj.Counter"/>
<aop:config>
<aop:aspect ref="monitoringAspect">
<aop:before method="before" pointcut="execution(* increment*())" />
<aop:around method="around" pointcut="execution(* increment*())" />
</aop:aspect>
</aop:config>
<bean id="monitoringAspect" class="org.springframework.aop.aspectj.JoinPointMonitorAspect" lazy-init="true">
<property name="counter" ref="counter"/>
</bean>
</beans>

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="beforeAdviceBindingTests" ref="testAspect">
<aop:pointcut id="foo" expression="execution(* foo(..)) and args(x)"/>
<aop:before pointcut-ref="foo" method="doBefore(int)"/>
<aop:before pointcut-ref="foo" method="doBefore(java.lang.String)"/>
</aop:aspect>
</aop:config>
<bean id="toBeAdvised" class="org.springframework.aop.aspectj.ToBeAdvised"/>
<bean id="testAspect" class="org.springframework.aop.aspectj.MyAspect"/>
</beans>

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="thisMatcher" ref="testAspect">
<aop:before pointcut="execution(* *(..)) and this(java.io.Serializable)" method="toString"/>
</aop:aspect>
<aop:aspect id="targetMatcher" ref="testAspect">
<aop:before pointcut="execution(* *(..)) and target(java.io.Serializable)" method="toString"/>
</aop:aspect>
<aop:aspect id="argsMatcher" ref="testAspect">
<aop:before pointcut="execution(* bar(..)) and args(java.io.Serializable)" method="toString"/>
</aop:aspect>
</aop:config>
<!-- should not be proxied -->
<bean id="testClassA" class="org.springframework.aop.aspectj.SubtypeMatchingTestClassA"/>
<!-- should be proxied -->
<bean id="testClassB" class="org.springframework.aop.aspectj.SubtypeMatchingTestClassB"/>
<!-- should be proxied -->
<bean id="testClassC" class="org.springframework.aop.aspectj.SubtypeMatchingTestClassC"/>
<bean id="testAspect" class="java.lang.Object"/>
</beans>

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:advisor pointcut="target(org.springframework.aop.aspectj.TargetPointcutSelectionTests$TestImpl1)"
advice-ref="testInterceptor"/>
<aop:aspect ref="testAspectForTestImpl1">
<aop:before pointcut="target(org.springframework.aop.aspectj.TargetPointcutSelectionTests$TestImpl1)"
method="increment"/>
</aop:aspect>
<aop:aspect ref="testAspectForAbstractTestImpl">
<aop:before pointcut="target(org.springframework.aop.aspectj.TargetPointcutSelectionTests$AbstractTestImpl)"
method="increment"/>
</aop:aspect>
</aop:config>
<bean id="testImpl1" class="org.springframework.aop.aspectj.TargetPointcutSelectionTests$TestImpl1"/>
<bean id="testImpl2" class="org.springframework.aop.aspectj.TargetPointcutSelectionTests$TestImpl2"/>
<bean id="testAspectForTestImpl1" class="org.springframework.aop.aspectj.TargetPointcutSelectionTests$TestAspect"/>
<bean id="testAspectForAbstractTestImpl" class="org.springframework.aop.aspectj.TargetPointcutSelectionTests$TestAspect"/>
<bean id="testInterceptor" class="org.springframework.aop.aspectj.TargetPointcutSelectionTests$TestInterceptor"/>
</beans>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy proxy-target-class="false"/>
<bean id="counter"
class="org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests$Counter" />
<bean id="testBean" class="org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests$TestImpl" />
<bean id="testAnnotatedClassBean" class="org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests$AnnotatedClassTestImpl" />
<bean id="testAnnotatedMethodBean" class="org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests$AnnotatedMethodTestImpl" />
</beans>

View File

@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect ref="thisAsClassCounter">
<aop:before method="increment"
pointcut="this(org.springframework.aop.aspectj.TestImpl)" />
</aop:aspect>
<aop:aspect ref="thisAsInterfaceCounter">
<aop:before method="increment"
pointcut="this(org.springframework.aop.aspectj.TestInterface)" />
</aop:aspect>
<aop:aspect ref="targetAsClassCounter">
<aop:before method="increment"
pointcut="target(org.springframework.aop.aspectj.TestImpl)" />
</aop:aspect>
<aop:aspect ref="targetAsInterfaceCounter">
<aop:before method="increment"
pointcut="target(org.springframework.aop.aspectj.TestInterface)" />
</aop:aspect>
<aop:aspect ref="thisAsClassAndTargetAsClassCounter">
<aop:before method="increment"
pointcut="this(org.springframework.aop.aspectj.TestImpl) and target(org.springframework.aop.aspectj.TestImpl)" />
</aop:aspect>
<aop:aspect ref="thisAsInterfaceAndTargetAsInterfaceCounter">
<aop:before method="increment"
pointcut="this(org.springframework.aop.aspectj.TestInterface) and target(org.springframework.aop.aspectj.TestInterface)" />
</aop:aspect>
<aop:aspect ref="thisAsInterfaceAndTargetAsClassCounter">
<aop:before method="increment"
pointcut="this(org.springframework.aop.aspectj.TestInterface) and target(org.springframework.aop.aspectj.TestImpl)" />
</aop:aspect>
</aop:config>
<bean id="thisAsClassCounter" class="org.springframework.aop.aspectj.Counter" />
<bean id="thisAsInterfaceCounter" class="org.springframework.aop.aspectj.Counter" />
<bean id="targetAsClassCounter" class="org.springframework.aop.aspectj.Counter" />
<bean id="targetAsInterfaceCounter" class="org.springframework.aop.aspectj.Counter" />
<bean id="thisAsClassAndTargetAsClassCounter" class="org.springframework.aop.aspectj.Counter" />
<bean id="thisAsInterfaceAndTargetAsInterfaceCounter" class="org.springframework.aop.aspectj.Counter" />
<bean id="thisAsInterfaceAndTargetAsClassCounter" class="org.springframework.aop.aspectj.Counter" />
<bean id="testBean" class="org.springframework.aop.aspectj.TestImpl" />
</beans>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="annotationBindingAspect" ref="testAspect">
<aop:around pointcut="@annotation(testAnnotation)" method="doWithAnnotation"/>
</aop:aspect>
</aop:config>
<bean id="testAspect" class="org.springframework.aop.aspectj.autoproxy.AnnotationBindingTestAspect"/>
<bean id="testBean" class="org.springframework.aop.aspectj.autoproxy.AnnotatedTestBeanImpl"/>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:advisor advice-ref="testInterceptor" pointcut-ref="myPointcut"/>
</aop:config>
<bean id="testInterceptor" class="org.springframework.aop.aspectj.autoproxy.TestMethodInterceptor"/>
<bean id="myPointcut" class="org.springframework.aop.support.annotation.AnnotationMatchingPointcut" factory-method="forMethodAnnotation">
<constructor-arg value="org.springframework.aop.aspectj.autoproxy.TestAnnotation"/>
</bean>
<bean id="testAspect" class="org.springframework.aop.aspectj.autoproxy.AnnotationBindingTestAspect"/>
<bean id="testBean" class="org.springframework.aop.aspectj.autoproxy.AnnotatedTestBeanImpl"/>
</beans>

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect ref="interfaceExtendingAspect">
<aop:pointcut id="anyOperation"
expression="execution(* *(..))"/>
<aop:around pointcut-ref="anyOperation" method="increment"/>
</aop:aspect>
</aop:config>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean" />
<bean id="interfaceExtendingAspect"
class="org.springframework.aop.aspectj.autoproxy.InterfaceExtendingAspect"/>
</beans>

View File

@@ -1,26 +0,0 @@
<?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 class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator">
<property name="customTargetSourceCreators">
<bean class="org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator"/>
</property>
</bean>
<bean class="org.springframework.aop.aspectj.autoproxy.MultiplyReturnValue">
<property name="multiple" value="2"/>
</bean>
<bean id="adrianParent" abstract="true">
<property name="name" value="adrian"/>
</bean>
<!-- parent="adrianParent" -->
<bean id="adrian" class="org.springframework.aop.aspectj.autoproxy.LazyTestBean" lazy-init="true">
<property name="age" value="34"/>
<property name="name" value="adrian"/>
</bean>
</beans>

View File

@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<!--
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator" />
-->
<aop:aspectj-autoproxy/>
<bean class="org.springframework.aop.aspectj.autoproxy.MultiplyReturnValue">
<property name="multiple" value="2"/>
</bean>
<bean class="org.springframework.aop.aspectj.autoproxy.DummyAspect"/>
<bean class="org.springframework.aop.aspectj.autoproxy.DummyAspectWithParameter"/>
<bean id="adrianParent" abstract="true">
<property name="name" value="adrian"/>
</bean>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean" parent="adrianParent">
<property name="age" value="34"/>
</bean>
<bean id="adrian2Parent" class="org.springframework.tests.sample.beans.TestBean" abstract="true">
<property name="name" value="adrian"/>
</bean>
<bean id="factoryBean" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" ref="adrian"/>
<property name="targetMethod" value="toString"/>
</bean>
</beans>

View File

@@ -1,28 +0,0 @@
<?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>
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator"/>
<bean id="aspect" class="org.springframework.aop.aspectj.autoproxy.MultiplyReturnValue">
<property name="multiple" value="3"/>
</bean>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="Adrian"/>
<property name="age" value="34"/>
</bean>
<bean id="adrian2" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name" value="Adrian"/>
<property name="age" value="34"/>
</bean>
<bean id="i21" class="org.springframework.tests.sample.beans.NestedTestBean" scope="prototype">
<property name="company" value="i21"/>
</bean>
<bean id="advisor" class="org.springframework.aop.aspectj.autoproxy.TestBeanAdvisor"/>
</beans>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"
default-lazy-init="true">
<aop:aspectj-autoproxy/>
<bean class="org.springframework.aop.aspectj.autoproxy.MultiplyReturnValue">
<property name="multiple" value="2"/>
</bean>
<bean id="factoryBean" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" ref="adrian"/>
<property name="targetMethod" value="toString"/>
</bean>
<bean id="adrianParent" abstract="true">
<property name="name" value="adrian"/>
</bean>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean" parent="adrianParent">
<property name="age" value="34"/>
</bean>
<bean id="adrian2Parent" class="org.springframework.aop.aspectj.autoproxy.DummyFactoryBean" abstract="true"/>
</beans>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<!--
<bean
class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator" />
-->
<aop:aspectj-autoproxy proxy-target-class="true" expose-proxy="true"/>
</beans>

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<!--
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator" />
-->
<aop:aspectj-autoproxy/>
<bean class="org.springframework.aop.aspectj.autoproxy.MultiplyReturnValue">
<property name="multiple" value="2"/>
</bean>
<bean class="org.springframework.aop.aspectj.autoproxy.IncreaseReturnValue"/>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="adrian"/>
<property name="age" value="34"/>
</bean>
</beans>

View File

@@ -1,23 +0,0 @@
<?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>
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator"/>
<bean class="test.aspect.PerTargetAspect"
scope="prototype">
<property name="order" value="5"/>
</bean>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name" value="adrian"/>
<property name="age" value="34"/>
</bean>
<bean id="juergen" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name" value="juergen"/>
<property name="age" value="30"/>
</bean>
</beans>

View File

@@ -1,15 +0,0 @@
<?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>
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator"/>
<bean class="test.aspect.PerThisAspect" scope="prototype"/>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name" value="adrian"/>
<property name="age" value="34"/>
</bean>
</beans>

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
<aop:aspectj-autoproxy proxy-target-class="true"/>
<bean id="retryAspect" class="org.springframework.aop.aspectj.autoproxy.RetryAspect"/>
<bean id="unreliableBean" class="org.springframework.aop.aspectj.autoproxy.UnreliableBean"/>
</beans>

View File

@@ -1,15 +0,0 @@
<?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>
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator"/>
<bean id="aspect" class="test.aspect.TwoAdviceAspect"/>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name" value="adrian"/>
<property name="age" value="34"/>
</bean>
</beans>

View File

@@ -1,16 +0,0 @@
<?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>
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator"/>
<bean id="aspect" class="test.aspect.TwoAdviceAspect"
scope="prototype"/>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name" value="adrian"/>
<property name="age" value="34"/>
</bean>
</beans>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy>
<aop:include name="aspectOne"/>
</aop:aspectj-autoproxy>
<bean id="aspectOne" class="org.springframework.aop.aspectj.autoproxy.MultiplyReturnValue" >
<property name="multiple" value="2" />
</bean>
<bean id="aspectTwo"
class="org.springframework.aop.aspectj.autoproxy.MultiplyReturnValue" >
<property name="multiple" value="2" />
</bean>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="adrian" />
<property name="age" value="34" />
</bean>
</beans>

View File

@@ -1,15 +0,0 @@
<?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>
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator"/>
<bean id="aspect" class="org.springframework.aop.aspectj.autoproxy.AdviceUsingThisJoinPoint"/>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name" value="adrian"/>
<property name="age" value="34"/>
</bean>
</beans>

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="aspect" class="org.springframework.aop.aspectj.autoproxy.ExceptionHandlingAspect"/>
</beans>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy/>
<bean id="testAspect" class="org.springframework.aop.aspectj.autoproxy.AtAspectJAnnotationBindingTestAspect"/>
<bean id="testBean" class="org.springframework.aop.aspectj.autoproxy.AnnotatedTestBeanImpl"/>
<bean id="arrayFactoryBean" class="org.springframework.aop.aspectj.autoproxy.ResourceArrayFactoryBean"/>
</beans>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<!--
<bean
class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator" />
-->
<aop:aspectj-autoproxy/>
<bean
class="org.springframework.aop.aspectj.autoproxy.MultiplyReturnValue" >
<property name="multiple" value="2" />
</bean>
<bean
class="org.springframework.aop.aspectj.autoproxy.benchmark.TraceAspect" >
</bean>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="adrian" />
<property name="age" value="34" />
</bean>
</beans>

View File

@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<!--
<bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator" />
-->
<aop:aspectj-autoproxy>
<!-- Explicit testing the whitespace body variant here -->
</aop:aspectj-autoproxy>
<bean class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor" >
<property name="advice" ref="multiplyReturnValueInterceptor" />
<property name="mappedName" value="getAge" />
</bean>
<bean id="multiplyReturnValueInterceptor"
class="org.springframework.aop.aspectj.autoproxy.benchmark.MultiplyReturnValueInterceptor" >
<property name="multiple" value="2" />
</bean>
<bean class="org.springframework.aop.aspectj.autoproxy.benchmark.TraceBeforeAdvice"
factory-method="advisor" />
<bean class="org.springframework.aop.aspectj.autoproxy.benchmark.TraceAfterReturningAdvice"
factory-method="advisor" />
<bean class="org.springframework.aop.aspectj.autoproxy.benchmark.TraceAspect"/>
<bean id="adrian" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="adrian"/>
<property name="age" value="34"/>
</bean>
</beans>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy/>
<bean id="service" class="org.springframework.aop.aspectj.autoproxy.spr3064.ServiceImpl"/>
<bean id="transactionInterceptor" class="org.springframework.aop.aspectj.autoproxy.spr3064.TransactionInterceptor"/>
</beans>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy/>
<bean id="counterAspect" class="org.springframework.aop.aspectj.generic.CounterAspect"/>
<bean id="testBean" class="org.springframework.aop.aspectj.generic.GenericReturnTypeVariationClass"/>
</beans>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy proxy-target-class="true"/>
<bean id="counterAspect" class="org.springframework.aop.aspectj.generic.GenericCounterAspect"/>
<bean id="testBean" class="org.springframework.aop.aspectj.generic.DerivedStringParameterizedClass"/>
</beans>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy proxy-target-class="false"/>
<bean id="counterAspect" class="org.springframework.aop.aspectj.generic.GenericCounterAspect"/>
<bean id="testBean" class="org.springframework.aop.aspectj.generic.DerivedStringParameterizedClass"/>
</beans>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:aspectj-autoproxy/>
<bean id="counterAspect" class="org.springframework.aop.aspectj.generic.GenericParameterMatchingTests$CounterAspect"/>
<bean id="testBean" class="org.springframework.aop.aspectj.generic.GenericParameterMatchingTests$GenericImpl"/>
</beans>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:pointcut id="pc" expression="execution(* getAge())"/>
<aop:before pointcut-ref="pc" method="myBeforeAdvice" returning="age" />
</aop:aspect>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:pointcut id="pc" expression="execution(* getAge())"/>
<aop:before pointcut-ref="pc" method="myBeforeAdvice" />
<aop:after pointcut-ref="pc" method="myAfterAdvice" />
<aop:after-returning pointcut-ref="pc" method="myAfterReturningAdvice" returning="age"/>
<aop:after-throwing pointcut-ref="pc" method="myAfterThrowingAdvice" throwing="ex"/>
<aop:around pointcut-ref="pc" method="myAroundAdvice"/>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:before pointcut="execution(* setAge(..)) and args(age) and this(bean)"
method="mySetAgeAdvice" arg-names="age bean"/>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:before pointcut="execution(* setAge(..)) and args(age) and this(bean)"
method="mySetAgeAdvice" arg-names="age,bean"/>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<aop:config proxy-target-class="true" expose-proxy="true">
<aop:pointcut id="getNameCalls" expression="execution(* getName(..)) and within(*..ITestBean+)"/>
<aop:advisor id="getAgeAdvisor" pointcut="execution(* *..ITestBean.getAge(..))" advice-ref="getAgeCounter"/>
<aop:advisor id="getNameAdvisor" pointcut-ref="getNameCalls" advice-ref="getNameCounter"/>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:pointcut id="setCalls" expression="execution(* *..ITestBean.set*(..))"/>
<aop:before pointcut="execution(* *..ITestBean.set*(..))" method="myBeforeAdvice"/>
<aop:after pointcut-ref="setCalls" method="myAfterAdvice"/>
<aop:around pointcut-ref="setCalls" method="myAroundAdvice"/>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:after pointcut="execution(int getAge(..))" method="myAfterAdvice" returning="age"/>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:after-returning pointcut="execution(int getAge(..))" method="myAfterReturningAdvice" returning="age"/>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:pointcut id="getNameCalls" expression="execution(* getName(..)) and within(*..ITestBean+)"/>
<aop:advisor id="getAgeAdvisor" pointcut="execution(* *..ITestBean.getAge(..))" advice-ref="getAgeCounter"/>
<aop:advisor id="getNameAdvisor" pointcut-ref="getNameCalls" advice-ref="getNameCounter"/>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:pointcut id="setCalls" expression="execution(* *..ITestBean.set*(..))"/>
<aop:before pointcut="execution(* *..ITestBean.set*(..))" method="myBeforeAdvice"/>
<aop:after pointcut-ref="setCalls" method="myAfterAdvice"/>
<aop:around pointcut-ref="setCalls" method="myAroundAdvice"/>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:after pointcut="execution(int getAge(..))" method="myAfterAdvice" throwing="ex"/>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<aop:config>
<aop:aspect id="countAgeCalls" ref="countingAdvice">
<aop:after-throwing pointcut="execution(int getAge(..))" method="myAfterThrowingAdvice" throwing="ex"/>
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="service" class="org.springframework.tests.sample.beans.TestBean" scope="prototype"/>
<bean id="serviceDependent1" class="org.springframework.tests.sample.beans.TestBean">
<constructor-arg ref="service"/>
</bean>
<bean id="serviceDependent2" class="org.springframework.tests.sample.beans.TestBean">
<constructor-arg ref="service"/>
</bean>
<bean id="nullInstance" class="org.springframework.tests.sample.beans.FactoryMethods" factory-method="nullInstance"/>
<bean id="serviceInterceptor" class="org.springframework.aop.interceptor.DebugInterceptor"/>
<aop:config proxy-target-class="false">
<aop:pointcut id="servicePointcut" expression="target(org.springframework.tests.sample.beans.ITestBean)"/>
<aop:advisor advice-ref="serviceInterceptor" pointcut-ref="servicePointcut"/>
</aop:config>
</beans>

View File

@@ -1,13 +0,0 @@
<?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 default-dependency-check="all">
<bean id="testBean" class="org.springframework.aop.framework.CglibTestBean">
<property name="name" value="Rob Harrop"/>
<lookup-method name="getName" bean="fixedName"/>
</bean>
<bean id="fixedName" class="java.lang.String"/>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">
<context:component-scan base-package="org.springframework.aop.framework" />
<aop:config>
<aop:advisor advice-ref="debugInterceptor" pointcut="bean(classWithComplexConstructor)" />
</aop:config>
<bean id="debugInterceptor"
class="org.springframework.aop.interceptor.DebugInterceptor" />
</beans>

View File

@@ -1,16 +0,0 @@
<?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>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="testBean" class="org.springframework.aop.framework.ProxyFactoryBean">
<!-- Target is autowired, so can check type of parent without a guard -->
<property name="target">
<bean class="org.springframework.tests.sample.beans.TestBean" autowire="byType"/>
</property>
<property name="interceptorNames" value="debugInterceptor"/>
</bean>
</beans>

View File

@@ -1,171 +0,0 @@
<?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="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>custom</value></property>
<property name="age"><value>666</value></property>
</bean>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="test1" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="target"><ref local="test"/></property>
<property name="interceptorNames"><value>debugInterceptor</value></property>
</bean>
<!--
Check that invoker is automatically added to wrap target.
Non pointcut bean name should be wrapped in invoker.
-->
<bean id="autoInvoker" class="org.springframework.aop.framework.ProxyFactoryBean">
<!--
Aspect interfaces don't need to be included here.
They may, for example, be added by global interceptors.
-->
<property name="interfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<!--
Note that "test" is a target. An InvokerInterceptor
will be added automatically.
-->
<property name="interceptorNames"><value>global*,test</value></property>
</bean>
<bean id="prototype" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interfaces">
<value>
org.springframework.tests.sample.beans.ITestBean
</value>
</property>
<property name="singleton"><value>false</value></property>
<property name="interceptorNames"><value>test</value></property>
</bean>
<bean id="test2" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>
org.springframework.tests.sample.beans.ITestBean
</value>
</property>
<property name="singleton"><value>false</value></property>
<property name="targetName"><value>test</value></property>
</bean>
<bean id="test3" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="autodetectInterfaces"><value>true</value></property>
<property name="target"><ref local="test"/></property>
<property name="interceptorNames"><value>debugInterceptor</value></property>
</bean>
<bean id="test4" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="autodetectInterfaces"><value>true</value></property>
<property name="singleton"><value>false</value></property>
<property name="targetName"><value>test</value></property>
</bean>
<bean id="testCircle1" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="autodetectInterfaces"><value>true</value></property>
<property name="targetName"><value>testCircleTarget1</value></property>
</bean>
<bean id="testCircleTarget1" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>custom</value></property>
<property name="age"><value>666</value></property>
<property name="spouse"><ref bean="testCircle2"/></property>
</bean>
<bean id="testCircle2" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="autodetectInterfaces"><value>true</value></property>
<property name="targetName"><value>testCircleTarget2</value></property>
</bean>
<bean id="testCircleTarget2" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>custom</value></property>
<property name="age"><value>666</value></property>
<property name="spouse"><ref bean="testCircle1"/></property>
</bean>
<bean id="pointcuts" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="interceptorNames"><value>pointcutForVoid</value></property>
<property name="targetName"><value>test</value></property>
</bean>
<bean id="pointcutForVoid" class="org.springframework.aop.framework.ProxyFactoryBeanTests$PointcutForVoid"/>
<!--
Invalid test for global pointcuts.
Must have target because there are no interceptors.
-->
<!--
<bean id="noInterceptorNamesWithoutTarget"
class="org.springframework.aop.framework.ProxyFactoryBean"
>
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
</bean>
<bean id="noInterceptorNamesWithTarget"
class="org.springframework.aop.framework.ProxyFactoryBean"
>
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="target"><ref local="test"/></property>
</bean>
-->
<bean id="validGlobals" scope="singleton" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.context.ApplicationListener</value></property>
<property name="interceptorNames"><value>debugInterceptor,global*,target2</value></property>
</bean>
<!--
Global debug interceptor
-->
<bean id="global_debug" class="org.springframework.aop.interceptor.DebugInterceptor"/>
<!--
Will add aspect interface to all beans exposing globals
-->
<bean id="global_aspectInterface" class="org.springframework.aop.framework.ProxyFactoryBeanTests$GlobalIntroductionAdvice"/>
<bean id="prototypeLockMixinAdvisor" class="test.mixin.LockMixinAdvisor" scope="prototype"/>
<bean id="prototypeTestBean" class="org.springframework.tests.sample.beans.TestBean" scope="prototype"/>
<bean id="prototypeTestBeanProxy" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="singleton"><value>false</value></property>
<property name="interceptorNames">
<list>
<value>prototypeLockMixinAdvisor</value>
<value>prototypeTestBean</value>
</list>
</property>
</bean>
<bean id="prototypeLockMixinInterceptor" class="test.mixin.LockMixin" scope="prototype"/>
<bean id="prototypeTestBeanProxySingletonTarget" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interfaces">
<list>
<value>org.springframework.tests.sample.beans.ITestBean</value>
<value>test.mixin.Lockable</value>
</list>
</property>
<property name="singleton"><value>false</value></property>
<property name="target"><ref local="prototypeTestBean"/></property>
<property name="interceptorNames">
<list>
<value>prototypeLockMixinInterceptor</value>
</list>
</property>
</bean>
</beans>

View File

@@ -1,54 +0,0 @@
<?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>
<bean id="eveTargetSource" class="org.springframework.aop.target.SingletonTargetSource">
<constructor-arg>
<bean class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Eve</value></property>
</bean>
</constructor-arg>
</bean>
<bean id="adam" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Adam</value></property>
</bean>
<bean id="adamTargetSource" class="org.springframework.aop.target.SingletonTargetSource">
<constructor-arg>
<ref local="adam"/>
</constructor-arg>
</bean>
<bean id="countingBeforeAdvice"
class="org.springframework.tests.aop.advice.CountingBeforeAdvice"
/>
<bean id="doubleTarget"
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<!-- this is the one used and NOT the one set by targetSource -->
<property name="interceptorNames"><value>countingBeforeAdvice,adamTargetSource</value></property>
<property name="targetSource"><ref bean="eveTargetSource"/></property>
</bean>
<!-- but this is also possible -->
<bean id="arbitraryTarget"
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<!-- this is the one used and NOT the one set by targetSource -->
<property name="interceptorNames"><value>adam</value></property>
<property name="targetSource"><ref local="eveTargetSource"/></property>
</bean>
</beans>

View File

@@ -1,28 +0,0 @@
<?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="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>custom</value></property>
<property name="age"><value>666</value></property>
</bean>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor">
</bean>
<bean id="frozen"
class="org.springframework.aop.framework.ProxyFactoryBean"
>
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="target"><ref local="test"/></property>
<property name="interceptorNames"><value>debugInterceptor</value></property>
<property name="frozen"><value>true</value></property>
<property name="optimize"><value>true</value></property>
</bean>
</beans>

View File

@@ -1,38 +0,0 @@
<?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">
<!--
Test that inner bean for target means that we can use
autowire without ambiguity from target and proxy.
$Id: innerBeanTarget.xml,v 1.4 2006/08/20 19:08:40 jhoeller Exp $
-->
<beans>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor">
</bean>
<bean id="testBean"
class="org.springframework.aop.framework.ProxyFactoryBean"
>
<property name="target">
<bean class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>innerBeanTarget</value></property>
</bean>
</property>
<property name="interceptorNames">
<value>nopInterceptor</value>
</property>
</bean>
<!--
Autowire would fail if distinct target and proxy:
we expect just to have proxy
-->
<bean id="autowireCheck"
class="org.springframework.aop.framework.ProxyFactoryBeanTests$DependsOnITestBean"
autowire="constructor" />
</beans>

View File

@@ -1,21 +0,0 @@
<?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>
<!-- Same effect as noInterceptor names: also invalid -->
<bean id="emptyInterceptorNames" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="interceptorNames"><value></value></property>
</bean>
<!--
Invalid test for global pointcuts.
Must have target after *.
-->
<bean id="globalsWithoutTarget" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="interceptorNames"><value>global*</value></property>
</bean>
</beans>

View File

@@ -1,34 +0,0 @@
<?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>
<bean id="adam" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Adam</value></property>
</bean>
<bean id="countingBeforeAdvice"
class="org.springframework.tests.aop.advice.CountingBeforeAdvice"
/>
<!--
An error, as the target source or non-advice object
must be last
-->
<bean id="targetSourceNotLast"
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<!-- this is the one used and NOT the one set by targetSource -->
<property name="interceptorNames"><value>adam,countingBeforeAdvice</value></property>
</bean>
</beans>

View File

@@ -1,37 +0,0 @@
<?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 independent prototype behavior.
-->
<beans>
<!-- Simple target -->
<bean id="test" class="org.springframework.tests.sample.beans.SideEffectBean">
<property name="count"><value>10</value></property>
</bean>
<bean id="prototypeTarget" class="org.springframework.tests.sample.beans.SideEffectBean" scope="prototype">
<property name="count"><value>10</value></property>
</bean>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="singleton" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>debugInterceptor,test</value></property>
</bean>
<bean id="prototype" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>debugInterceptor,prototypeTarget</value></property>
<property name="singleton"><value>false</value></property>
</bean>
<bean id="cglibPrototype"
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>debugInterceptor,prototypeTarget</value></property>
<property name="singleton"><value>false</value></property>
<!-- Force the use of CGLIB -->
<property name="proxyTargetClass"><value>true</value></property>
</bean>
</beans>

View File

@@ -1,40 +0,0 @@
<?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 independent prototype behaviour.
-->
<beans>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="serializableNopInterceptor" class="org.springframework.tests.aop.interceptor.SerializableNopInterceptor"/>
<bean id="serializableSingleton" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>serializableNopInterceptor</value></property>
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.Person</value></property>
<property name="target">
<bean class="org.springframework.tests.sample.beans.SerializablePerson">
<property name="name"><value>serializableSingleton</value></property>
</bean>
</property>
</bean>
<bean id="prototypeTarget" class="org.springframework.tests.sample.beans.SerializablePerson">
<property name="name"><value>serializablePrototype</value></property>
</bean>
<bean id="serializablePrototype" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>serializableNopInterceptor,prototypeTarget</value></property>
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.Person</value></property>
<property name="singleton"><value>false</value></property>
</bean>
<bean id="interceptorNotSerializableSingleton" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>nopInterceptor</value></property>
<property name="target">
<bean class="org.springframework.tests.sample.beans.SerializablePerson"/>
</property>
</bean>
</beans>

View File

@@ -1,58 +0,0 @@
<?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 independent prototype behaviour.
-->
<beans>
<!-- Simple target -->
<bean id="target" class="org.springframework.tests.sample.beans.TestBean">
<!-- initial value :-) -->
<property name="name"><value>Adam</value></property>
</bean>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor">
</bean>
<bean id="countingBeforeAdvice"
class="org.springframework.tests.aop.advice.CountingBeforeAdvice"
/>
<!--
Note that there's normally no reason to create objects of this type
in a BeanFactory. If for some strange reason you want to, use Type 3 IoC.
-->
<bean id="targetSource" class="org.springframework.aop.target.SingletonTargetSource">
<constructor-arg><ref local="target"/></constructor-arg>
</bean>
<bean id="directTarget"
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames" value="countingBeforeAdvice,nopInterceptor,target"/>
<property name="proxyTargetClass" value="true"/>
</bean>
<bean id="viaTargetSource"
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>nopInterceptor,targetSource</value></property>
<property name="proxyTargetClass" value="true"/>
</bean>
<bean id ="unsupportedInterceptor"
class="org.springframework.aop.framework.UnsupportedInterceptor"
/>
<!--
No target or target source, just the interceptor
-->
<bean id="noTarget"
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="interceptorNames"><value>nopInterceptor,unsupportedInterceptor</value></property>
</bean>
</beans>

View File

@@ -1,26 +0,0 @@
<?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 throws advice.
$Id: throwsAdvice.xml,v 1.6 2006/08/20 19:08:40 jhoeller Exp $
-->
<beans>
<!-- Simple target -->
<bean id="target" class="org.springframework.aop.framework.Echo"/>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="countingBeforeAdvice" class="org.springframework.tests.aop.advice.CountingBeforeAdvice" />
<bean id="throwsAdvice" class="org.springframework.tests.aop.advice.MyThrowsHandler"/>
<bean id="throwsAdvised" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames">
<value>countingBeforeAdvice,nopInterceptor,throwsAdvice,target</value>
</property>
</bean>
</beans>

View File

@@ -1,23 +0,0 @@
<?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>
<bean id="testBeanTarget" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="simpleBeforeAdvice" class="org.springframework.aop.framework.adapter.SimpleBeforeAdviceImpl"/>
<bean id="simpleBeforeAdviceAdvisor" class="org.springframework.aop.support.DefaultPointcutAdvisor">
<constructor-arg><ref local="simpleBeforeAdvice"/></constructor-arg>
</bean>
<bean id="testBean" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="interceptorNames"><value>simpleBeforeAdviceAdvisor,testBeanTarget</value></property>
</bean>
<bean id="testAdvisorAdapter" class="org.springframework.aop.framework.adapter.SimpleBeforeAdviceAdapter"/>
<bean id="adapterRegistrationManager" class="org.springframework.aop.framework.adapter.AdvisorAdapterRegistrationManager"/>
</beans>

View File

@@ -1,21 +0,0 @@
<?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>
<bean id="testBeanTarget" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="simpleBeforeAdvice" class="org.springframework.aop.framework.adapter.SimpleBeforeAdviceImpl"/>
<bean id="simpleBeforeAdviceAdvisor" class="org.springframework.aop.support.DefaultPointcutAdvisor">
<constructor-arg><ref local="simpleBeforeAdvice"/></constructor-arg>
</bean>
<bean id="testBean" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="interceptorNames"><value>simpleBeforeAdviceAdvisor,testBeanTarget</value></property>
</bean>
<bean id="testAdvisorAdapter" class="org.springframework.aop.framework.adapter.SimpleBeforeAdviceAdapter"/>
</beans>

View File

@@ -1,47 +0,0 @@
<?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">
<!--
Shows common interceptor along with advisor.
-->
<beans>
<description>
Matches all Advisors in the factory: we don't use a prefix
</description>
<bean id="aapc"
class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
<!-- This common interceptor will be applied always,
before custom lockable advisor -->
<property name="interceptorNames">
<value>nopInterceptor</value>
</property>
</bean>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor" />
<!--
Stateful mixin. Will apply to all objects
Note that singleton property is false.
-->
<bean id="lockableAdvisor"
class="test.mixin.LockMixinAdvisor"
scope="prototype"
/>
<bean id="test1"
class="org.springframework.tests.sample.beans.TestBean">
<property name="age"><value>4</value></property>
</bean>
<bean id="test2"
class="org.springframework.tests.sample.beans.TestBean">
<property name="age"><value>4</value></property>
</bean>
</beans>

View File

@@ -1,34 +0,0 @@
<?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>
<bean id="autoproxy" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
<property name="customTargetSourceCreators">
<list>
<bean class="org.springframework.aop.framework.autoproxy.SelectivePrototypeTargetSourceCreator"/>
<bean class="org.springframework.aop.framework.autoproxy.target.LazyInitTargetSourceCreator"/>
</list>
</property>
</bean>
<bean id="test" scope="prototype" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Rod</value></property>
<property name="spouse"><ref local="wife"/></property>
</bean>
<bean id="prototypeTest" class="org.springframework.tests.sample.beans.CountingTestBean">
<property name="name"><value>Rod</value></property>
<property name="spouse"><ref local="wife"/></property>
</bean>
<bean id="lazyInitTest" class="org.springframework.tests.sample.beans.CountingTestBean" lazy-init="true">
<property name="name"><value>Rod</value></property>
<property name="spouse"><ref local="wife"/></property>
</bean>
<bean id="wife" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Kerry</value></property>
</bean>
</beans>

View File

@@ -1,24 +0,0 @@
<?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>
<bean id="optimizedTestBean" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="Optimized"/>
</bean>
<bean id="countingAdvice" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="advisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice" ref="countingAdvice"/>
<property name="patterns">
<list>
<value>.*beans.I?TestBean.*</value>
</list>
</property>
</bean>
<bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
<property name="optimize" value="true"/>
</bean>
</beans>

View File

@@ -1,44 +0,0 @@
<?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>
<bean id="aapc" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
<property name="customTargetSourceCreators">
<list>
<ref local="aapc.quickTargetSourceCreator"/>
</list>
</property>
</bean>
<bean id="aapc.quickTargetSourceCreator"
class="org.springframework.aop.framework.autoproxy.target.QuickTargetSourceCreator"/>
<bean id="test" scope="prototype" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Rod</value></property>
<property name="spouse"><ref local="wife"/></property>
</bean>
<bean id="wife" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Kerry</value></property>
</bean>
<!-- Prefix means it will be pooled -->
<bean id=":test" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Rod</value></property>
<property name="spouse"><ref local="wife"/></property>
</bean>
<!-- Prefix means it will be thread local -->
<bean name="%test" scope="prototype" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Rod</value></property>
<property name="spouse"><ref local="wife"/></property>
</bean>
<!-- Prefix means it will be a prototype target source -->
<bean name="!test" scope="prototype" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Rod</value></property>
<property name="spouse"><ref local="wife"/></property>
</bean>
</beans>

View File

@@ -1,29 +0,0 @@
<?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>
<bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames" value="*"/>
<property name="proxyTargetClass" value="true"/>
<property name="interceptorNames" value="checker"/>
</bean>
<bean id="checker" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice">
<bean class="org.springframework.aop.framework.autoproxy.NullChecker"/>
</property>
<property name="patterns">
<bean class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<value>.*\.set[a-zA-Z]*(.*)</value>
</list>
</property>
</bean>
</property>
</bean>
<bean id="bean" class="org.springframework.tests.sample.beans.TestBean"/>
</beans>

View File

@@ -1,117 +0,0 @@
<?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>
<bean id="frozenProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames" value="frozenBean"/>
<property name="frozen" value="true"/>
<property name="interceptorNames" value="nopInterceptor"/>
</bean>
<bean id="_jdkBeanNameProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<description>
Automatically proxies using JDK dynamic proxies
</description>
<property name="beanNames"><value>jdk*,onlyJdk,doubleJdk</value></property>
<property name="interceptorNames">
<list>
<value>nopInterceptor</value>
</list>
</property>
</bean>
<bean id="doubleJdkBeanNameProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames" value="doubleJdk"/>
<property name="interceptorNames" value="nopInterceptor"/>
</bean>
<bean id="_cglibBeanNameProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames">
<value>
cglib*
</value>
</property>
<property name="proxyTargetClass">
<description>Use the inherited ProxyConfig property to force CGLIB proxying</description>
<value>true</value>
</property>
<property name="interceptorNames">
<description>Interceptors and Advisors to apply automatically</description>
<list>
<value>nopInterceptor</value>
<value>countingBeforeAdvice</value>
</list>
</property>
</bean>
<bean id="introductionBeanNameProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<description>
Illustrates a JDK introduction
</description>
<property name="beanNames"><value>*introductionUsingJdk</value></property>
<property name="interceptorNames">
<list>
<value>introductionNopInterceptor</value>
<value>timestampIntroduction</value>
<value>lockableAdvisor</value>
</list>
</property>
</bean>
<bean id="timestampIntroduction" class="org.springframework.tests.aop.advice.TimestampIntroductionAdvisor"/>
<!--
Stateful mixin. Note that singleton property is false.
-->
<bean id="lockableAdvisor" class="test.mixin.LockMixinAdvisor"
scope="prototype"/>
<bean id="countingBeforeAdvice" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="introductionNopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="introductionUsingJdk" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>introductionUsingJdk</value></property>
</bean>
<bean id="second-introductionUsingJdk" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>second-introductionUsingJdk</value></property>
</bean>
<!--
Lazy only because it breaks other tests until this test is fixed
-->
<bean id="factory-introductionUsingJdk" class="org.springframework.aop.framework.autoproxy.CreatesTestBean"
lazy-init="true">
</bean>
<bean id="jdk1" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>jdk1</value></property>
</bean>
<bean id="frozen" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="frozenBean"/>
</bean>
<alias name="frozen" alias="frozenBean"/>
<bean id="cglib1" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>cglib1</value></property>
</bean>
<bean id="onlyJdk" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>onlyJdk</value></property>
</bean>
<bean id="doubleJdk" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>doubleJdk</value></property>
</bean>
<bean id="noproxy" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>noproxy</value></property>
</bean>
</beans>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="scopedList" class="java.util.ArrayList" scope="request">
<aop:scoped-proxy/>
</bean>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean">
<property name="friends" ref="scopedList"/>
</bean>
</beans>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean id="singletonMap" class="java.util.Collections" factory-method="singletonMap" scope="prototype">
<aop:scoped-proxy/>
<constructor-arg value="test"/>
<constructor-arg value="1234"/>
</bean>
<bean id="synchronizedMap" class="java.util.Collections" factory-method="synchronizedMap" scope="singleton">
<constructor-arg ref="singletonParams"/>
</bean>
<bean id="simpleMap" class="java.util.HashMap" scope="prototype">
<aop:scoped-proxy/>
</bean>
</beans>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean" scope="request">
<aop:scoped-proxy proxy-target-class="false"/>
<property name="age" value="99"/>
</bean>
<bean class="org.springframework.beans.factory.config.PropertyOverrideConfigurer">
<property name="properties">
<map>
<entry key="testBean.sex" value="male"/>
</map>
</property>
</bean>
</beans>

View File

@@ -1,13 +0,0 @@
<?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>
<bean id="testBeanTarget" class="org.springframework.tests.sample.beans.TestBean" scope="request"/>
<bean id="testBean" class="org.springframework.aop.scope.ScopedProxyFactoryBean">
<property name="targetBeanName" value="testBeanTarget"/>
<property name="proxyTargetClass" value="false"/>
</bean>
</beans>

View File

@@ -1,69 +0,0 @@
<?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>
<bean id="prototypeTest" class="org.springframework.tests.sample.beans.SideEffectBean" scope="prototype">
<property name="count"><value>10</value></property>
</bean>
<bean id="poolTargetSource" class="org.springframework.aop.target.CommonsPool2TargetSource">
<property name="targetBeanName"><value>prototypeTest</value></property>
<property name="maxSize"><value>25</value></property>
</bean>
<bean id="poolConfigAdvisor" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject"><ref local="poolTargetSource" /></property>
<property name="targetMethod"><value>getPoolingConfigMixin</value></property>
</bean>
<bean id="nop" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<!--
This will create a bean for each thread ("apartment")
-->
<bean id="pooled" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource"><ref local="poolTargetSource"/></property>
<property name="interceptorNames"><value>nop</value></property>
</bean>
<bean id="pooledNoInterceptors" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource"><ref local="poolTargetSource"/></property>
</bean>
<bean id="pooledWithMixin" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource"><ref local="poolTargetSource"/></property>
<property name="interceptorNames"><value>poolConfigAdvisor</value></property>
<!-- Necessary as have a mixin and want to avoid losing the class,
because there's no target interface -->
<property name="proxyTargetClass"><value>true</value></property>
</bean>
<!-- Serialization tests using serializable target and advice -->
<bean id="serializableNop" class="org.springframework.tests.aop.interceptor.SerializableNopInterceptor" />
<bean id="prototypePerson" class="org.springframework.tests.sample.beans.SerializablePerson" scope="prototype"/>
<bean id="personPoolTargetSource" class="org.springframework.aop.target.CommonsPool2TargetSource">
<property name="targetBeanName"><value>prototypePerson</value></property>
<property name="maxSize"><value>10</value></property>
</bean>
<bean id="pooledPerson" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource"><ref local="personPoolTargetSource"/></property>
<property name="interceptorNames"><value>serializableNop</value></property>
</bean>
<bean id="maxSizePooledPerson" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource">
<bean class="org.springframework.aop.target.CommonsPool2TargetSource">
<property name="targetBeanName" value="prototypePerson"/>
<property name="maxSize" value="10"/>
<property name="maxWait" value="1"/>
</bean>
</property>
<property name="interceptorNames"><value>serializableNop</value></property>
</bean>
</beans>

View File

@@ -1,39 +0,0 @@
<?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>
<!--
Not yet in use: illustration of possible approach.
-->
<bean id="autoProxiedOverload" lazy-init="true"
class="org.springframework.beans.factory.xml.OverloadLookup">
<lookup-method name="newTestBean" bean="jenny"/>
</bean>
<bean id="regularlyProxiedOverloadTarget" scope="prototype"
class="org.springframework.beans.factory.xml.OverloadLookup">
<lookup-method name="newTestBean" bean="jenny"/>
</bean>
<bean id="regularlyProxiedOverload" lazy-init="true" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="target"><ref local="regularlyProxiedOverloadTarget"/></property>
<property name="proxyTargetClass"><value>true</value></property>
<property name="interceptorNames"><value>interceptor</value></property>
</bean>
<bean id="jenny" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name"><value>Jenny</value></property>
<property name="age"><value>30</value></property>
</bean>
<!-- Add autoproxy -->
<bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames"><value>autoProxiedOverload</value></property>
<property name="proxyTargetClass"><value>true</value></property>
<property name="interceptorNames"><value>interceptor</value></property>
</bean>
<bean id="interceptor" class="org.springframework.aop.interceptor.DebugInterceptor"/>
</beans>

View File

@@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<context:annotation-config/>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="properties">
<props>
<prop key="myProp">larry</prop>
</props>
</property>
</bean>
<bean id="larryBean" class="org.springframework.beans.factory.xml.QualifierAnnotationTests$Person">
<property name="name" value="LarryBean"/>
</bean>
<alias name="${myProp}Bean" alias="someAlias"/>
<alias name="someAlias" alias="stooge"/>
<bean class="org.springframework.beans.factory.xml.QualifierAnnotationTests$Person">
<property name="name" value="Larry"/>
<qualifier value="larry"/>
</bean>
<bean class="org.springframework.beans.factory.xml.QualifierAnnotationTests$SpecialPerson">
<property name="name" value="LarrySpecial"/>
</bean>
<bean class="org.springframework.beans.factory.xml.QualifierAnnotationTests$Person">
<property name="name" value="Curly"/>
<qualifier type="QualifierAnnotationTests.SimpleValueQualifier" value="curly"/>
</bean>
<bean class="org.springframework.beans.factory.xml.QualifierAnnotationTests$Person">
<meta key="name" value="moe"/>
<meta key="age" value="42"/>
<property name="name" value="Moe Sr."/>
</bean>
<bean class="org.springframework.beans.factory.xml.QualifierAnnotationTests$Person">
<property name="name" value="Moe Jr."/>
<qualifier type="QualifierAnnotationTests.MultipleAttributeQualifier">
<attribute key="name" value="moe"/>
<attribute key="age" value="15"/>
</qualifier>
</bean>
<bean id="testProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"/>
<bean id="thetaClient" class="org.springframework.beans.factory.xml.QualifierAnnotationTests$MultiQualifierClient"/>
<bean id="thetaFactory" class="org.springframework.beans.factory.xml.QualifierAnnotationTests$QualifiedFactoryBean"/>
<bean id="thetaImpl" class="org.springframework.beans.factory.xml.QualifierAnnotationTests$ThetaImpl"/>
</beans>

View File

@@ -1,64 +0,0 @@
<?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>
<bean id="rod1" class="org.springframework.tests.sample.beans.DependenciesBean"
autowire="byType" dependency-check="objects">
<!-- Should pick up spouse automatically -->
</bean>
<bean id="rod1a" class="org.springframework.tests.sample.beans.DependenciesBean"
autowire="autodetect" dependency-check="objects">
<!-- Should pick up spouse automatically -->
</bean>
<bean id="rod2" class="org.springframework.tests.sample.beans.DependenciesBean"
autowire="byName" dependency-check="objects">
<!-- Should pick up spouse automatically -->
</bean>
<bean id="rod2a" class="org.springframework.tests.sample.beans.DependenciesBean"
autowire="byName" dependency-check="objects">
<property name="spouse" ref="spouse"/>
</bean>
<bean id="rod3" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean"
autowire="constructor" dependency-check="objects">
<!-- Should pick up spouse automatically -->
</bean>
<bean id="rod3a" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean"
autowire="autodetect" dependency-check="objects">
<!-- Should pick up spouse automatically -->
</bean>
<bean id="rod4" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean"
scope="prototype" dependency-check="objects">
<!-- Should not pick up spouse automatically -->
</bean>
<bean id="rod5" class="org.springframework.tests.sample.beans.DependenciesBean"
scope="prototype" autowire="constructor">
<!-- Should pick up spouse automatically -->
</bean>
<bean id="other" class="org.springframework.tests.sample.beans.IndexedTestBean"/>
<bean id="parentAppCtx" class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<value>/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml</value>
</constructor-arg>
</bean>
<bean id="childAppCtx" class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
<value>/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml</value>
<value>/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml</value>
</list>
</constructor-arg>
<constructor-arg><ref bean="parentAppCtx"/></constructor-arg>
</bean>
</beans>

View File

@@ -1,51 +0,0 @@
<?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>
<bean id="inheritsFromParentFactory" parent="inheritedTestBean">
<property name="name"><value>override</value></property>
<!-- age should inherit value of 1 from parent -->
</bean>
<bean id="inheritsWithDifferentClass" class="org.springframework.tests.sample.beans.DerivedTestBean"
parent="inheritedTestBean" init-method="initialize">
<property name="name"><value>override</value></property>
<!-- age should inherit value of 1 from parent -->
</bean>
<bean id="inheritsWithClass" class="org.springframework.tests.sample.beans.DerivedTestBean"
parent="inheritedTestBeanWithoutClass" init-method="initialize">
<property name="name"><value>override</value></property>
<!-- age should inherit value of 1 from parent -->
</bean>
<bean id="protoypeInheritsFromParentFactorySingleton" parent="inheritedTestBean" scope="prototype">
<property name="name"><value>prototypeOverridesInheritedSingleton</value></property>
<!-- age should inherit value of 1 from parent -->
</bean>
<bean id="prototypeInheritsFromParentFactoryPrototype" parent="inheritedTestBeanPrototype" scope="prototype">
<property name="name"><value>prototype-override</value></property>
<!-- age should inherit value of 2 from parent -->
</bean>
<bean id="singletonInheritsFromParentFactoryPrototype" parent="inheritedTestBeanPrototype" scope="singleton">
<property name="name"><value>prototype-override</value></property>
<!-- age should inherit value of 2 from parent -->
</bean>
<bean id="inheritedTestBean" parent="inheritedTestBean">
<property name="name"><value>overrideParentBean</value></property>
<!-- age should inherit value of 1 from parent -->
</bean>
<bean id="bogusParent" parent="bogus" scope="prototype"/>
<bean id="indexedTestBean" class="org.springframework.tests.sample.beans.IndexedTestBean">
<property name="array[0].name"><value>myname</value></property>
</bean>
<bean parent="inheritedTestBean"/>
</beans>

View File

@@ -1,8 +0,0 @@
<?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>
<bean id="classNotFound" class="WhatALotOfRubbish"/>
</beans>

View File

@@ -1,376 +0,0 @@
<?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.5.xsd">
<bean id="jenny" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Jenny</value></property>
<property name="age"><value>30</value></property>
<property name="spouse">
<!-- Could use id and href -->
<ref local="david"/>
</property>
</bean>
<bean id="david" class="org.springframework.tests.sample.beans.TestBean">
<description>
Simple bean, without any collections.
</description>
<property name="name">
<description>The name of the user</description>
<value>David</value>
</property>
<property name="age"><value>27</value></property>
</bean>
<bean id="rod" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>Rod</value></property>
<property name="age"><value>32</value></property>
<property name="friends">
<description>List of Rod's friends</description>
<list>
<ref local="jenny"/>
<ref local="david"/>
</list>
</property>
</bean>
<bean id="pJenny" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name"><value>Jenny</value></property>
<property name="age"><value>30</value></property>
<property name="spouse">
<!-- Could use id and href -->
<ref local="david"/>
</property>
</bean>
<bean id="pDavid" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name"><value>David</value></property>
<property name="age"><value>27</value></property>
</bean>
<bean id="pRod" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name"><value>Rod</value></property>
<property name="age"><value>32</value></property>
<property name="friends">
<list>
<ref local="pJenny"/>
<ref local="pDavid"/>
</list>
</property>
</bean>
<!--
Try setting a collection property to a single value
-->
<bean id="loner" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>loner</value></property>
<property name="age"><value>26</value></property>
<property name="friends">
<list>
<description>My List</description>
<ref local="david"/>
</list>
</property>
</bean>
<bean id="jumble" class="org.springframework.beans.factory.xml.MixedCollectionBean">
<property name="jumble">
<list>
<ref local="david"/>
<value>literal</value>
<ref local="jenny"/>
<idref local="rod"/>
</list>
</property>
</bean>
<bean id="jumble2" class="org.springframework.beans.factory.xml.MixedCollectionBean" lazy-init="true">
<property name="jumble">
<list>
<ref local="david"/>
<value>literal</value>
<ref local="jenny"/>
<idref bean="rod"/>
<idref bean="rod2"/>
</list>
</property>
</bean>
<bean id="verbose" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><value>verbose</value></property>
</bean>
<bean id="verbose2" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><idref local="verbose"/></property>
</bean>
<bean id="verbose3" class="org.springframework.tests.sample.beans.TestBean">
<property name="name"><idref bean="verbose"/></property>
</bean>
<bean id="emptyMap" class="org.springframework.tests.sample.beans.HasMap">
<property name="map">
<map>
</map>
</property>
</bean>
<bean id="literalMap" class="org.springframework.tests.sample.beans.HasMap">
<property name="map">
<map>
<entry key="foo" value="bar"/>
<entry key="fi" value="fum"/>
<entry key="fa"><null/></entry>
</map>
</property>
</bean>
<bean id="mixedMap" class="org.springframework.tests.sample.beans.HasMap">
<property name="map">
<map>
<entry key-ref="fooKey">
<value type="java.lang.Integer">10</value>
</entry>
<entry>
<key>
<ref bean="jennyKey"/>
</key>
<ref local="jenny"/>
</entry>
<entry>
<key>
<bean class="java.lang.Integer">
<constructor-arg value="5"/>
</bean>
</key>
<idref bean="david"/>
</entry>
</map>
</property>
</bean>
<bean id="fooKey" class="java.lang.String">
<constructor-arg value="foo"/>
</bean>
<bean id="jennyKey" class="java.lang.String">
<constructor-arg value="jenny"/>
</bean>
<bean id="pMixedMap" class="org.springframework.tests.sample.beans.HasMap" scope="prototype">
<property name="map">
<map>
<entry key="foo" value="bar"/>
<entry key="jenny" value-ref="pJenny"/>
</map>
</property>
</bean>
<bean id="mixedMapWithList" class="org.springframework.tests.sample.beans.HasMap">
<property name="map">
<map>
<entry>
<key><null/></key>
<value>bar</value>
</entry>
<entry key="jenny"><ref local="jenny"/></entry>
<entry key="list">
<list>
<value>zero</value>
<map>
<entry key="fo"><value>bar</value></entry>
<entry key="jen"><ref local="jenny"/></entry>
</map>
<list>
<ref local="jenny"/>
<value>ba</value>
</list>
<null/>
</list>
</entry>
<entry key="map">
<map>
<entry key="foo"><value>bar</value></entry>
<entry key="jenny"><ref local="jenny"/></entry>
</map>
</entry>
</map>
</property>
</bean>
<bean id="emptySet" class="org.springframework.tests.sample.beans.HasMap">
<property name="set">
<set>
</set>
</property>
</bean>
<bean id="set" class="org.springframework.tests.sample.beans.HasMap">
<property name="set">
<set>
<value>bar</value>
<ref local="jenny"/>
<null/>
</set>
</property>
</bean>
<bean id="emptyProps" class="org.springframework.tests.sample.beans.HasMap">
<property name="props">
<props>
</props>
</property>
</bean>
<bean id="props" class="org.springframework.tests.sample.beans.HasMap">
<property name="props">
<props>
<prop key="foo">bar</prop>
<prop key="2">TWO</prop>
</props>
</property>
</bean>
<bean id="propsViaMap" class="org.springframework.tests.sample.beans.HasMap">
<property name="props">
<map>
<entry key="foo" value="bar"/>
<entry key="2" value="TWO"/>
</map>
</property>
</bean>
<bean id="objectArray" class="org.springframework.tests.sample.beans.HasMap">
<property name="objectArray">
<list>
<value>one</value>
<ref local="jenny"/>
</list>
</property>
</bean>
<bean id="classArray" class="org.springframework.tests.sample.beans.HasMap">
<property name="classArray">
<list>
<value>java.lang.String</value>
<value>java.lang.Exception</value>
</list>
</property>
</bean>
<bean id="integerArray" class="org.springframework.tests.sample.beans.HasMap">
<property name="integerArray">
<list>
<value>0</value>
<value>1</value>
<value>2</value>
</list>
</property>
</bean>
<bean id="listFactory" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<value>bar</value>
<value>jenny</value>
</list>
</property>
<property name="targetListClass">
<value>java.util.LinkedList</value>
</property>
</bean>
<bean id="pListFactory" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<value>bar</value>
<value>jenny</value>
</list>
</property>
<property name="targetListClass">
<value>java.util.LinkedList</value>
</property>
<property name="singleton">
<value>true</value>
</property>
</bean>
<bean id="setFactory" class="org.springframework.beans.factory.config.SetFactoryBean">
<property name="sourceSet">
<set>
<value>bar</value>
<value>jenny</value>
</set>
</property>
<property name="targetSetClass">
<value>java.util.TreeSet</value>
</property>
</bean>
<bean id="pSetFactory" class="org.springframework.beans.factory.config.SetFactoryBean">
<property name="sourceSet">
<set>
<value>bar</value>
<value>jenny</value>
</set>
</property>
<property name="targetSetClass">
<value>java.util.TreeSet</value>
</property>
<property name="singleton">
<value>true</value>
</property>
</bean>
<bean id="mapFactory" class="org.springframework.beans.factory.config.MapFactoryBean">
<property name="sourceMap">
<map>
<entry key="foo"><value>bar</value></entry>
<entry key="jen"><value>jenny</value></entry>
</map>
</property>
<property name="targetMapClass">
<value>java.util.TreeMap</value>
</property>
</bean>
<bean id="pMapFactory" class="org.springframework.beans.factory.config.MapFactoryBean">
<property name="sourceMap">
<map>
<entry key="foo"><value>bar</value></entry>
<entry key="jen"><value>jenny</value></entry>
</map>
</property>
<property name="targetMapClass">
<value>java.util.TreeMap</value>
</property>
<property name="singleton">
<value>true</value>
</property>
</bean>
<bean id="setAndMap" class="org.springframework.beans.factory.xml.MapAndSet">
<constructor-arg>
<map>
<description>My Map</description>
<entry key="key1" value="val1"/>
<entry key="key2" value="val2"/>
<entry key="key3" value="val3"/>
</map>
</constructor-arg>
</bean>
<bean id="enumSetFactory" class="org.springframework.beans.factory.config.SetFactoryBean">
<property name="sourceSet">
<set>
<description>My Set</description>
<value type="java.lang.String">ONE</value>
<value type="java.lang.String">TWO</value>
</set>
</property>
</bean>
</beans>

View File

@@ -1,33 +0,0 @@
<?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>
<bean id="proxy1" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces" value="java.io.Serializable"/>
<property name="targetName" value="target1"/>
</bean>
<bean id="target1" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean"
autowire="constructor"/>
<bean id="toBeFoundByType" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="proxy2" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces" value="org.springframework.tests.sample.beans.ITestBean"/>
<property name="targetName" value="target2"/>
</bean>
<bean id="target2" class="org.springframework.tests.sample.beans.DependenciesBean">
<property name="spouse">
<bean class="org.springframework.tests.sample.beans.TestBean">
<property name="someSet">
<set>
<ref local="proxy1"/>
</set>
</property>
</bean>
</property>
</bean>
</beans>

View File

@@ -1,230 +0,0 @@
<?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-3.0.xsd">
<bean id="rod1" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean">
<constructor-arg><ref bean="kerry2"/></constructor-arg>
</bean>
<bean id="rod2" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean">
<constructor-arg index="1" ref="kerry1"/>
<constructor-arg index="0" ref="kerry2"/>
<constructor-arg><ref bean="other"/></constructor-arg>
</bean>
<bean id="rod2Accessor" class="org.springframework.tests.sample.beans.TestBean" lazy-init="true">
<property name="friends">
<list>
<ref bean="rod2"/>
</list>
</property>
<property name="touchy" value="."/>
</bean>
<bean id="rod3" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean"
autowire="constructor">
<constructor-arg index="0"><ref bean="kerry2"/></constructor-arg>
<constructor-arg index="1"><ref bean="kerry2"/></constructor-arg>
</bean>
<bean id="rod4" class="org.springframework.beans.factory.xml.DerivedConstructorDependenciesBean"
autowire="constructor">
<constructor-arg index="0">
<description>wife</description>
<ref bean="kerry2"/>
</constructor-arg>
<constructor-arg><ref bean="kerry2"/></constructor-arg>
</bean>
<bean id="rod5" class="org.springframework.beans.factory.xml.DerivedConstructorDependenciesBean">
<constructor-arg index="1">
<description>wife</description>
<ref bean="kerry1"/>
</constructor-arg>
<constructor-arg index="3">
<description>
magic int value: 99 is the number of aliens who can dance on the tip of pin
</description>
<value>99</value>
</constructor-arg>
<constructor-arg><ref bean="other"/></constructor-arg>
<constructor-arg index="4"><value>myname</value></constructor-arg>
<constructor-arg index="0"><ref bean="kerry2"/></constructor-arg>
</bean>
<bean id="rod6" class="org.springframework.beans.factory.xml.DerivedConstructorDependenciesBean"
init-method="init" destroy-method="destroy">
<constructor-arg index="1"><ref bean="kerry1"/></constructor-arg>
<constructor-arg><ref bean="other"/></constructor-arg>
<constructor-arg index="0"><ref bean="kerry2"/></constructor-arg>
</bean>
<bean id="rod7" class="org.springframework.beans.factory.xml.DerivedConstructorDependenciesBean" scope="prototype">
<constructor-arg index="1"><ref bean="kerry1"/></constructor-arg>
<constructor-arg><ref bean="other"/></constructor-arg>
<constructor-arg><ref bean="other"/></constructor-arg>
<constructor-arg index="0"><ref bean="kerry2"/></constructor-arg>
</bean>
<bean id="rod8" class="org.springframework.beans.factory.xml.DerivedConstructorDependenciesBean" scope="prototype">
<constructor-arg index="2"><ref bean="other"/></constructor-arg>
<constructor-arg index="0"><ref bean="kerry2"/></constructor-arg>
</bean>
<bean id="rod9" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean" scope="prototype">
<constructor-arg type="int"><value>99</value></constructor-arg>
</bean>
<bean id="rod10" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean" scope="prototype">
<constructor-arg index="0" type="java.lang.String"><null/></constructor-arg>
</bean>
<bean id="rod11" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean" scope="prototype">
<constructor-arg index="0"><ref local="kerry2"/></constructor-arg>
</bean>
<bean id="rod12" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean">
<constructor-arg index="0"><ref bean="kerry1"/></constructor-arg>
</bean>
<bean id="rod13" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean">
<constructor-arg index="0"><ref bean="kerry1"/></constructor-arg>
<constructor-arg index="1"><ref bean="kerry2"/></constructor-arg>
</bean>
<bean id="rod14" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean">
<constructor-arg><ref bean="kerry1"/></constructor-arg>
<constructor-arg><ref bean="kerry2"/></constructor-arg>
</bean>
<bean id="rod15" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean">
<constructor-arg><ref bean="kerry2"/></constructor-arg>
<constructor-arg><ref bean="kerry1"/></constructor-arg>
</bean>
<bean id="rod16" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean">
<constructor-arg name="otherSpouse"><ref bean="kerry1"/></constructor-arg>
<constructor-arg name="spouse"><ref bean="kerry2"/></constructor-arg>
<constructor-arg><value>29</value></constructor-arg>
</bean>
<bean id="rod17" parent="rod16">
<constructor-arg name="otherSpouse"><ref bean="kerry2"/></constructor-arg>
<constructor-arg name="spouse"><ref bean="kerry1"/></constructor-arg>
</bean>
<bean id="rod18" class="org.springframework.beans.factory.xml.SimpleConstructorArgBean" scope="prototype">
</bean>
<bean id="kerry1" class="org.springframework.tests.sample.beans.TestBean">
<property name="name">
<value>Kerry1</value>
</property>
<property name="age">
<value>33</value>
</property>
</bean>
<bean id="kerry2" class="org.springframework.tests.sample.beans.TestBean">
<property name="name">
<value>Kerry2</value>
</property>
<property name="age">
<value>32</value>
</property>
</bean>
<bean id="other" class="org.springframework.tests.sample.beans.IndexedTestBean"/>
<bean id="file" class="java.io.File">
<constructor-arg><value>/test</value></constructor-arg>
</bean>
<bean id="beanWithBoolean" class="org.springframework.beans.factory.xml.SingleSimpleTypeConstructorBean" scope="prototype">
<constructor-arg type="boolean" value="true"/>
</bean>
<bean id="beanWithBoolean2" class="org.springframework.beans.factory.xml.SingleSimpleTypeConstructorBean" scope="prototype">
<constructor-arg value="true"/>
</bean>
<bean id="beanWithBooleanAndString" class="org.springframework.beans.factory.xml.SingleSimpleTypeConstructorBean" scope="prototype">
<constructor-arg type="boolean"><value>true</value></constructor-arg>
<constructor-arg><value>A String</value></constructor-arg>
</bean>
<bean id="beanWithBooleanAndString2" class="org.springframework.beans.factory.xml.SingleSimpleTypeConstructorBean" scope="prototype">
<constructor-arg value="A String"/>
<constructor-arg value="true"/>
</bean>
<bean id="Boolean" class="java.lang.Boolean">
<constructor-arg value="false"/>
</bean>
<bean id="nan" class="java.lang.Double" factory-method="valueOf">
<constructor-arg value="NaN" type="double"/>
</bean>
<bean id="beanWithDoubleBoolean" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$DoubleBooleanConstructorBean" autowire="constructor" scope="prototype" factory-method="create">
<constructor-arg type="java.lang.Boolean"><value>true</value></constructor-arg>
</bean>
<bean id="beanWithDoubleBooleanAndIndex" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$DoubleBooleanConstructorBean" autowire="constructor" scope="prototype">
<constructor-arg index="1"><value>true</value></constructor-arg>
</bean>
<bean id="beanWithDoubleBooleanNoType" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$DoubleBooleanConstructorBean" scope="prototype">
<constructor-arg index="0"><value>false</value></constructor-arg>
<constructor-arg index="1"><value>true</value></constructor-arg>
</bean>
<bean id="beanWithDoubleBooleanNoTypeFactoryMethod" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$DoubleBooleanConstructorBean" scope="prototype" factory-method="create">
<constructor-arg index="0"><value>false</value></constructor-arg>
<constructor-arg index="1"><value>true</value></constructor-arg>
</bean>
<bean id="lenientDependencyTestBean" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$LenientDependencyTestBean" scope="prototype">
<constructor-arg>
<bean class="org.springframework.tests.sample.beans.DerivedTestBean"/>
</constructor-arg>
</bean>
<bean id="lenientDependencyTestBeanFactoryMethod" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$LenientDependencyTestBean" scope="prototype" factory-method="create">
<constructor-arg>
<bean class="org.springframework.tests.sample.beans.DerivedTestBean"/>
</constructor-arg>
</bean>
<bean id="string" class="java.lang.String" autowire-candidate="false">
<constructor-arg><value type="java.lang.String">test</value></constructor-arg>
</bean>
<bean id="stringConstructor" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$StringConstructorTestBean" scope="prototype">
<constructor-arg value="test"/>
</bean>
<bean id="constructorArray" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$ConstructorArrayTestBean" scope="prototype">
<constructor-arg type="int[]">
<array value-type="int">
<value>1</value>
</array>
</constructor-arg>
</bean>
<bean id="indexedConstructorArray" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$ConstructorArrayTestBean" scope="prototype">
<constructor-arg index="0" type="int[]">
<array value-type="int">
<value>1</value>
</array>
</constructor-arg>
</bean>
<bean id="constructorArrayNoType" class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$ConstructorArrayTestBean" scope="prototype">
<constructor-arg>
<array value-type="java.lang.String"/>
</constructor-arg>
</bean>
</beans>

View File

@@ -1,34 +0,0 @@
<?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>
<bean id="constructorOverrides"
class="org.springframework.beans.factory.xml.ConstructorInjectedOverrides"
autowire="autodetect">
<!--
We combine a setter method with constructor
autowiring
-->
<property name="setterString"><value>from property element</value></property>
<lookup-method name="createFactoryMethods" bean="factoryMethods" />
</bean>
<bean id="jenny" class="org.springframework.tests.sample.beans.TestBean"
scope="singleton">
<property name="name"><value>Jenny</value></property>
<property name="age"><value>30</value></property>
</bean>
<bean id="factoryMethods"
class="org.springframework.beans.factory.xml.FactoryMethods"
factory-method="newInstance"
scope="prototype">
<constructor-arg index="0"><ref local="jenny"/></constructor-arg>
</bean>
</beans>

View File

@@ -1,24 +0,0 @@
<?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 default-autowire="byType" default-dependency-check="objects">
<bean id="rod1" class="org.springframework.tests.sample.beans.DependenciesBean">
<!-- Should pick up spouse automatically -->
</bean>
<bean id="rod2" class="org.springframework.tests.sample.beans.DependenciesBean">
<!-- Should pick up spouse automatically -->
</bean>
<bean id="rod3" class="org.springframework.tests.sample.beans.DependenciesBean" autowire="no">
<!-- Should not pick up spouse automatically -->
</bean>
<bean id="spouse" class="org.springframework.tests.sample.beans.TestBean" autowire="no" dependency-check="none">
<property name="name">
<value>Kerry</value>
</property>
</bean>
</beans>

View File

@@ -1,20 +0,0 @@
<?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 default-lazy-init="true">
<bean id="lazy-and-bad"
class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$BadInitializer"
init-method="init2"
/>
<bean id="init-and-ib"
class="org.springframework.beans.factory.xml.XmlBeanFactoryTests$InitAndIB"
lazy-init="false"
init-method="customInit"
destroy-method="customDestroy"
/>
<bean id="prototype" class="org.springframework.tests.sample.beans.TestBean" scope="prototype"/>
</beans>

Some files were not shown because too many files have changed in this diff Show More