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,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.aop.framework.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.framework.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</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:config>
<aop:advisor advice-ref="countingAdvice" pointcut="within(org.springframework..*)"/>
</aop:config>
<bean id="countingAdvice" class="org.springframework.aop.framework.CountingBeforeAdvice"/>
</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:config>
<aop:pointcut id="myPointcut" expression="within(org.springframework..*)"/>
</aop:config>
</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:config>
<aop:pointcut id="pc" expression="within(org.springframework..*)"/>
<aop:advisor advice-ref="countingAdvice" pointcut-ref="pc"/>
</aop:config>
<bean id="countingAdvice" class="org.springframework.aop.framework.CountingBeforeAdvice"/>
</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="countAgeCalls" ref="countingAdvice">
<aop:pointcut id="pc" expression="execution(* getAge())"/>
<aop:before pointcut-ref="pc" pointcut="execution(* getAge())" method="myBeforeAdvice"/>
</aop:aspect>
</aop:config>
<bean id="getAgeCounter" class="org.springframework.aop.framework.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</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="countAgeCalls" ref="countingAdvice">
<aop:pointcut id="pc" expression="execution(* getAge())"/>
<aop:before method="myBeforeAdvice" />
</aop:aspect>
</aop:config>
<bean id="getAgeCounter" class="org.springframework.aop.framework.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean"/>
<bean id="countingAdvice" class="org.springframework.aop.config.CountingAspectJAdvice"/>
</beans>

View File

@@ -1,12 +0,0 @@
<config xmlns="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<pointcut id="testPointcut" expression="execution(* foo(..)) and within(springbank.dao.AccountDao+)"/>
<pointcut id="testPointcut1" expression="execution(* springbank.dao.AccountDao.foo(..))"/>
<aspect ref="myAspect">
<after method="foo" pointcut-ref="testPointcut"/>
</aspect>
</config>

View File

@@ -1,42 +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.aop.framework.PrototypeTargetTests$TestBeanImpl"
scope="prototype"/>
<bean id="testInterceptor" class="org.springframework.aop.framework.PrototypeTargetTests$TestInterceptor"
scope="singleton"/>
<bean id="testBeanPrototype" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.springframework.aop.framework.PrototypeTargetTests$TestBean</value>
</property>
<property name="singleton">
<value>false</value>
</property>
<property name="interceptorNames">
<list>
<value>testInterceptor</value>
<value>testBeanTarget</value>
</list>
</property>
</bean>
<bean id="testBeanSingleton" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.springframework.aop.framework.PrototypeTargetTests$TestBean</value>
</property>
<property name="singleton">
<value>true</value>
</property>
<property name="interceptorNames">
<list>
<value>testInterceptor</value>
<value>testBeanTarget</value>
</list>
</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">
<!--
Tests for throws advice.
-->
<beans>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="exposeInvocation" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
<property name="targetClass">
<value>org.springframework.aop.interceptor.ExposeInvocationInterceptor</value>
</property>
<property name="targetField"><value>INSTANCE</value></property>
</bean>
<bean id="countingBeforeAdvice" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="proxy" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="target">
<bean class="org.springframework.aop.interceptor.InvocationCheckExposedInvocationTestBean" />
</property>
<property name="interceptorNames">
<value>exposeInvocation,countingBeforeAdvice,nopInterceptor</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:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="scoped" class="org.springframework.aop.scope.ScopedProxyAutowireTests$TestBean" autowire-candidate="false">
<aop:scoped-proxy/>
</bean>
<bean id="unscoped" class="org.springframework.aop.scope.ScopedProxyAutowireTests$TestBean" autowire-candidate="true"/>
<bean id="autowired" class="org.springframework.aop.scope.ScopedProxyAutowireTests$TestBean" autowire="byType"/>
</beans>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="scoped" class="org.springframework.aop.scope.ScopedProxyAutowireTests$TestBean" autowire-candidate="true">
<aop:scoped-proxy/>
</bean>
<bean id="unscoped" class="org.springframework.aop.scope.ScopedProxyAutowireTests$TestBean" autowire-candidate="false"/>
<bean id="autowired" class="org.springframework.aop.scope.ScopedProxyAutowireTests$TestBean" autowire="byType"/>
</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">
<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="nopInterceptor" class="org.springframework.tests.aop.interceptor.SerializableNopInterceptor"/>
<bean id="settersAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice"><ref local="nopInterceptor"/></property>
<property name="pattern">
<value>
.*set.*
</value>
</property>
</bean>
<bean id="settersAdvised" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<property name="target"><ref local="test"/></property>
<property name="interceptorNames"><value>settersAdvisor</value></property>
</bean>
<bean id="serializableSettersAdvised" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.Person</value></property>
<property name="target">
<bean class="org.springframework.tests.sample.beans.SerializablePerson">
<property name="name"><value>serializableSettersAdvised</value></property>
</bean>
</property>
<property name="interceptorNames"><value>settersAdvisor</value></property>
</bean>
<!-- Illustrates use of multiple patterns -->
<bean id="settersAndAbsquatulateAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice"><ref local="nopInterceptor"/></property>
<property name="patterns">
<list>
<value>.*get.*</value>
<value>.*absquatulate</value>
</list>
</property>
</bean>
<bean id="settersAndAbsquatulateAdvised" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces"><value>org.springframework.tests.sample.beans.ITestBean</value></property>
<!-- Force CGLIB so we can cast to TestBean -->
<property name="proxyTargetClass"><value>true</value></property>
<property name="target"><ref local="test"/></property>
<property name="interceptorNames"><value>settersAndAbsquatulateAdvisor</value></property>
</bean>
</beans>

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="testBeanTarget" class="org.springframework.tests.sample.beans.TestBean" scope="prototype"/>
<bean id="targetSource" class="org.springframework.aop.target.CommonsPool2TargetSource">
<property name="targetBeanName" value="testBeanTarget"/>
</bean>
<bean id="testBean" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource" ref="targetSource"/>
</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 id="testBeanTarget" class="org.springframework.tests.sample.beans.TestBean" scope="prototype"/>
<bean id="targetSource" class="org.springframework.aop.target.CommonsPoolTargetSource">
<property name="targetBeanName" value="testBeanTarget"/>
</bean>
<bean id="testBean" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource" ref="targetSource"/>
</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">
<beans>
<!-- Simple target -->
<bean id="target1" class="org.springframework.tests.sample.beans.SideEffectBean">
<property name="count"><value>10</value></property>
</bean>
<bean id="target2" class="org.springframework.tests.sample.beans.SideEffectBean" scope="singleton">
<property name="count"><value>20</value></property>
</bean>
<!--
Hot swappable target source. Note the use of Type 3 IoC.
-->
<bean id="swapper" class="org.springframework.aop.target.HotSwappableTargetSource">
<constructor-arg><ref local="target1"/></constructor-arg>
</bean>
<bean id="swappable" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource"><ref local="swapper"/></property>
</bean>
</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="target" class="org.springframework.tests.sample.beans.TestBean" lazy-init="true">
<property name="age"><value>10</value></property>
</bean>
<!--
This will create a proxy that lazily fetches its target bean (with name "target").
-->
<bean id="proxy" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource">
<bean class="org.springframework.aop.target.LazyInitTargetSourceTests$CustomLazyInitTargetSource">
<property name="targetBeanName"><idref local="target"/></property>
</bean>
</property>
</bean>
</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">
<beans>
<bean id="target1" class="org.springframework.beans.factory.config.SetFactoryBean" lazy-init="true">
<property name="sourceSet">
<set>
<value>10</value>
</set>
</property>
</bean>
<!--
This will create a proxy that lazily fetches its target bean (with name "target").
-->
<bean id="proxy1" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces" value="java.util.Set"/>
<property name="targetSource">
<bean class="org.springframework.aop.target.LazyInitTargetSource">
<property name="targetBeanName" value="target1"/>
</bean>
</property>
</bean>
<bean id="target2" class="org.springframework.beans.factory.config.SetFactoryBean" lazy-init="true">
<property name="sourceSet">
<set>
<value>20</value>
</set>
</property>
</bean>
<!--
This will create a proxy that lazily fetches its target bean (with name "target").
-->
<bean id="proxy2" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="autodetectInterfaces" value="true"/>
<property name="targetSource">
<bean class="org.springframework.aop.target.LazyInitTargetSource">
<property name="targetBeanName" value="target2"/>
<property name="targetClass" value="java.util.Set"/>
</bean>
</property>
</bean>
</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="target" class="org.springframework.tests.sample.beans.TestBean" lazy-init="true">
<property name="age"><value>10</value></property>
</bean>
<!--
This will create a proxy that lazily fetches its target bean (with name "target").
-->
<bean id="proxy" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource">
<bean class="org.springframework.aop.target.LazyInitTargetSource">
<property name="targetBeanName"><idref local="target"/></property>
</bean>
</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>
<!-- Simple target -->
<bean id="test" class="org.springframework.tests.sample.beans.SideEffectBean">
<property name="count"><value>10</value></property>
</bean>
<bean id="prototypeTest" class="org.springframework.tests.sample.beans.SideEffectBean" scope="prototype">
<property name="count"><value>10</value></property>
</bean>
<bean id="prototypeTargetSource" class="org.springframework.aop.target.PrototypeTargetSource">
<property name="targetBeanName"><value>prototypeTest</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>
<!--
This will create a bean that creates a new target on each invocation.
-->
<bean id="prototype" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource"><ref local="prototypeTargetSource"/></property>
<property name="interceptorNames"><value>debugInterceptor</value></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">
<beans>
<bean id="prototypeTest" class="org.springframework.tests.sample.beans.SideEffectBean" scope="prototype">
<property name="count"><value>10</value></property>
</bean>
<bean id="threadLocalTs" class="org.springframework.aop.target.ThreadLocalTargetSource">
<property name="targetBeanName"><value>prototypeTest</value></property>
</bean>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor" />
<!--
We want to invoke the getStatsMixin method on our ThreadLocal invoker
-->
<bean id="statsAdvisor" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject"><ref local="threadLocalTs" /></property>
<property name="targetMethod"><value>getStatsMixin</value></property>
</bean>
<!--
This will create a bean for each thread ("apartment")
-->
<bean id="apartment" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>debugInterceptor,statsAdvisor</value></property>
<property name="targetSource"><ref local="threadLocalTs"/></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>
<!-- ================ Definitions for second ThreadLocalTargetSource ====== -->
<bean id="test" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<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>
<bean id="threadLocalTs2" class="org.springframework.aop.target.ThreadLocalTargetSource">
<property name="targetBeanName"><value>test</value></property>
</bean>
<bean id="threadLocal2" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetSource"><ref local="threadLocalTs2"/></property>
</bean>
</beans>