introducing common.beans.* packaging and externals; experimenting with sharing SideEffectBean
This commit is contained in:
parent
2be8114c63
commit
08eeb52e57
|
|
@ -24,7 +24,6 @@ import org.junit.Test;
|
|||
import org.springframework.aop.framework.Advised;
|
||||
import org.springframework.aop.framework.ProxyFactory;
|
||||
import org.springframework.aop.interceptor.SerializableNopInterceptor;
|
||||
import org.springframework.aop.interceptor.SideEffectBean;
|
||||
import org.springframework.aop.support.DefaultPointcutAdvisor;
|
||||
import org.springframework.beans.Person;
|
||||
import org.springframework.beans.SerializablePerson;
|
||||
|
|
@ -32,6 +31,8 @@ import org.springframework.beans.factory.xml.XmlBeanFactory;
|
|||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.util.SerializationTestUtils;
|
||||
|
||||
import common.beans.core.SideEffectBean;
|
||||
|
||||
/**
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@ import static org.junit.Assert.assertEquals;
|
|||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.aop.interceptor.SideEffectBean;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import common.beans.core.SideEffectBean;
|
||||
|
||||
/**
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@ import static org.junit.Assert.*;
|
|||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.aop.interceptor.SideEffectBean;
|
||||
import org.springframework.beans.ITestBean;
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import common.beans.core.SideEffectBean;
|
||||
|
||||
/**
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
<beans>
|
||||
|
||||
<!-- Simple target -->
|
||||
<bean id="target1" class="org.springframework.aop.interceptor.SideEffectBean">
|
||||
<bean id="target1" class="common.beans.core.SideEffectBean">
|
||||
<property name="count"><value>10</value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="target2" class="org.springframework.aop.interceptor.SideEffectBean" scope="singleton">
|
||||
<bean id="target2" class="common.beans.core.SideEffectBean" scope="singleton">
|
||||
<property name="count"><value>20</value></property>
|
||||
</bean>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
<beans>
|
||||
|
||||
<!-- Simple target -->
|
||||
<bean id="test" class="org.springframework.aop.interceptor.SideEffectBean">
|
||||
<bean id="test" class="common.beans.core.SideEffectBean">
|
||||
<property name="count"><value>10</value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="prototypeTest" class="org.springframework.aop.interceptor.SideEffectBean" scope="prototype">
|
||||
<bean id="prototypeTest" class="common.beans.core.SideEffectBean" scope="prototype">
|
||||
<property name="count"><value>10</value></property>
|
||||
</bean>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<beans>
|
||||
|
||||
<bean id="prototypeTest" class="org.springframework.aop.interceptor.SideEffectBean" scope="prototype">
|
||||
<bean id="prototypeTest" class="common.beans.core.SideEffectBean" scope="prototype">
|
||||
<property name="count"><value>10</value></property>
|
||||
</bean>
|
||||
|
||||
|
|
|
|||
|
|
@ -67,13 +67,14 @@ import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader;
|
|||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.beans.factory.xml.ConstructorDependenciesBean;
|
||||
import org.springframework.beans.factory.xml.DependenciesBean;
|
||||
import org.springframework.beans.factory.xml.SideEffectBean;
|
||||
import org.springframework.beans.propertyeditors.CustomNumberEditor;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
import org.springframework.util.StopWatch;
|
||||
|
||||
import common.beans.core.SideEffectBean;
|
||||
|
||||
/**
|
||||
* Tests properties population and autowire behavior.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.aop.interceptor;
|
||||
package common.beans.core;
|
||||
|
||||
/**
|
||||
* Bean that changes state on a business invocation, so that
|
||||
|
|
@ -37,7 +37,6 @@ import org.springframework.aop.IntroductionAdvisor;
|
|||
import org.springframework.aop.IntroductionInterceptor;
|
||||
import org.springframework.aop.interceptor.DebugInterceptor;
|
||||
import org.springframework.aop.interceptor.NopInterceptor;
|
||||
import org.springframework.aop.interceptor.SideEffectBean;
|
||||
import org.springframework.aop.support.AopUtils;
|
||||
import org.springframework.aop.support.DefaultIntroductionAdvisor;
|
||||
import org.springframework.aop.support.DefaultPointcutAdvisor;
|
||||
|
|
@ -57,6 +56,8 @@ import org.springframework.context.TestListener;
|
|||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.util.SerializationTestUtils;
|
||||
|
||||
import common.beans.core.SideEffectBean;
|
||||
|
||||
/**
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
<beans>
|
||||
|
||||
<!-- Simple target -->
|
||||
<bean id="test" class="org.springframework.aop.interceptor.SideEffectBean">
|
||||
<bean id="test" class="common.beans.core.SideEffectBean">
|
||||
<property name="count"><value>10</value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="prototypeTarget" class="org.springframework.aop.interceptor.SideEffectBean" scope="prototype">
|
||||
<bean id="prototypeTarget" class="common.beans.core.SideEffectBean" scope="prototype">
|
||||
<property name="count"><value>10</value></property>
|
||||
</bean>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.aop.framework.Advised;
|
||||
import org.springframework.aop.interceptor.SideEffectBean;
|
||||
import org.springframework.beans.Person;
|
||||
import org.springframework.beans.SerializablePerson;
|
||||
import org.springframework.beans.factory.xml.XmlBeanFactory;
|
||||
|
|
@ -33,6 +32,8 @@ import org.springframework.context.support.StaticApplicationContext;
|
|||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.util.SerializationTestUtils;
|
||||
|
||||
import common.beans.core.SideEffectBean;
|
||||
|
||||
/**
|
||||
* Tests for pooling invoker interceptor.
|
||||
* TODO: need to make these tests stronger: it's hard to
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<beans>
|
||||
|
||||
<bean id="prototypeTest" class="org.springframework.aop.interceptor.SideEffectBean" scope="prototype">
|
||||
<bean id="prototypeTest" class="common.beans.core.SideEffectBean" scope="prototype">
|
||||
<property name="count"><value>10</value></property>
|
||||
</bean>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue