Hi all, I created a custom annotation for enabling the execution of a certain aspect.
It should run around each method I annotate, and it does, except for the controllers.Code:<bean id="profilingAspect" class="com.domosafety.template.aspects.ProfilingAspect" /> <aop:config> <aop:pointcut id="profileAnnotatedTypes" expression="within(@com.domosafety.template.annotations.Profile *) and execution(* *(..))" /> <aop:pointcut id="profileAnnotatedMethods" expression="@annotation(com.domosafety.template.annotations.Profile) and execution(* *(..))" /> <aop:aspect id="aspectProfiling" ref="profilingAspect"> <aop:around method="doBasicProfiling" pointcut-ref="profileAnnotatedTypes" /> <aop:around method="doBasicProfiling" pointcut-ref="profileAnnotatedMethods" /> </aop:aspect> </aop:config>
How can I target the controllers using aop instead of interceptors?
Thank you
Daniel


Reply With Quote