Quantcast
Channel: . kam » aspectj
Viewing all articles
Browse latest Browse all 3

Check If The Aspect Was Applied

$
0
0
Let’s say you have an aspect defined that will be applied to a class: <bean id="someComponent" class="org.dotkam.SomeComponent" />   <aop:config> <aop:aspect ref="someAspect"> <aop:around method="someMethod" pointcut="execution(public * org.dotkam.SomeComponent.*(..))" /> </aop:aspect> </aop:config> and you of course have “proxy-target-class” set to “true”: <aop:aspectj-autoproxy proxy-target-class="true"/> Here is how to check if the aspect was applied: import static org.junit.Assert.assertTrue; import [...]

Viewing all articles
Browse latest Browse all 3