|
Spring Framework example source code file (proxyFactoryTargetSourceTests.xml)
This example Spring Framework source code file (proxyFactoryTargetSourceTests.xml) is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.
The Spring Framework proxyFactoryTargetSourceTests.xml source code
<?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.beans.TestBean">
<!-- initial value :-) -->
<property name="name">Adam
</bean>
<bean id="nopInterceptor" class="org.springframework.aop.interceptor.NopInterceptor">
</bean>
<bean id="countingBeforeAdvice"
class="org.springframework.aop.framework.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>
</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">nopInterceptor,targetSource
<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">org.springframework.beans.ITestBean
<property name="interceptorNames">nopInterceptor,unsupportedInterceptor
</bean>
</beans>
Other Spring Framework examples (source code examples)
Here is a short list of links related to this Spring Framework proxyFactoryTargetSourceTests.xml source code file:
|