tags:

views:

13

answers:

0

I have an aspect working correctly in my unit tests, a log message is printed from the actual method, and afterwards from the aspect applied.

When running my webapp though, I only see the result of the '@afterReturning' advice applied, my method does not execute first.

My config:

<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-3.0.xsd
   http://www.springframework.org/schema/aop 
   http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"&gt;

  <aop:aspectj-autoproxy proxy-target-class="true" />

  <bean id="loggingAspect" class="com.mypackage.MyAspect" />

</beans>

Any ideas ?

Thanks for your help.