0

Mine is a old legacy project and I am using Spring 1.2.5 . I am trying below code to apply aop over one of my business classes :

<bean id="hijackBeforeMethodBean" class="com.mycom.myapp.common.logging.LoggingAdvice" />

    <bean id="demoServiceProxy" 
                 class="org.springframework.aop.framework.ProxyFactoryBean">

        <property name="target">
<ref local="demoDelegate"></ref>
</property>
        <property name="interceptorNames">
            <list>
                <value>hijackBeforeMethodBean</value>
            </list>
        </property>
    </bean>
</beans>

In addition to this :

I firstly tried this over controllers ,but it didnt work.

I followed this link

http://www.javatpoint.com/spring-aop-example

but this asks me to inject or use the proxyfactory bean. A sper my current code I am injecting delegate beans in the controllers ,so in tht case I might have to change all my bean ids.

Please suggest some solution to this.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Rajeev Akotkar
  • 1,377
  • 4
  • 26
  • 46
  • http://forum.spring.io/forum/spring-projects/aop/13679-how-to-define-multiple-target,http://stackoverflow.com/questions/29375690/how-to-set-many-targets-to-proxyfactorybean Followed these links to achieve AOP over multiple beans ,but my bad ...no luck. please help – Rajeev Akotkar May 05 '16 at 07:36
  • Could you use annotation based AOP? – CrawlingKid May 05 '16 at 14:38
  • http://docs.spring.io/spring/docs/current/spring-framework-reference/html/aop.html – CrawlingKid May 05 '16 at 14:51

0 Answers0