J'ai un aspect qui fonctionne correctement dans mes tests unitaires, un message de journal est imprimé à partir de la méthode actuelle, et ensuite de l'aspect appliqué. Lorsque j'exécute ma webapp, je ne vois que le résultat du conseil '@afterReturning' appliqué, ma méthode ne s'exécute pas en premier.Pourquoi mon aspect Spring AOP fonctionne-t-il dans mon test unitaire mais pas ma webapp?
Ma 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">
<aop:aspectj-autoproxy proxy-target-class="true" />
<bean id="loggingAspect" class="com.mypackage.MyAspect" />
</beans>
Toutes les idées?
Merci pour votre aide.