Posted By

rahulshivsharan on 09/16/11


Tagged

SpringAOP


Versions (?)

Spring


 / Published in: XML
 

URL: SpringAOP/SimpleAOP Spring 2.0

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:p="http://www.springframework.org/schema/p"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xmlns:context="http://www.springframework.org/schema/context"
  6. xmlns:aop="http://www.springframework.org/schema/aop"
  7. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  8. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
  9. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
  10. <bean id="performer-inj" class="com.jal.Performer" scope="prototype" />
  11. <bean id="audience-inj" class="com.jal.Audience" scope="prototype" />
  12.  
  13. <bean id="audienceAdvice-inj" class="com.jal.AudienceAdvice" scope="prototype">
  14. <property name="audience" ref="audience-inj" />
  15. </bean>
  16.  
  17.  
  18. <bean id="performance-pointcut-inj" class="org.springframework.aop.support.JdkRegexpMethodPointcut" scope="prototype">
  19. <property name="pattern" value=".*perform" />
  20. </bean>
  21.  
  22. <bean id="audienceAdvisor-inj-1" class="org.springframework.aop.support.DefaultPointcutAdvisor" scope="prototype">
  23. <property name="pointcut" ref="performance-pointcut-inj" />
  24. <property name="advice" ref="audienceAdvice-inj" />
  25. </bean>
  26.  
  27.  
  28. <bean id="aa-inj" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" scope="singleton">
  29. <property name="advisorBeanNamePrefix" value="audienceAdvice-inj-2" />
  30. </bean>
  31.  
  32.  
  33.  
  34. </beans>

Report this snippet  

You need to login to post a comment.