DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Aop Timing Aspect With <aop:config> Style
<aop:config> way of doing http://dhruba.name/2008/12/16/spring-aop-timing-aspect/
// description of your code here
<bean class="a.TimingAspect" name="timingAspectBean" />
<aop:config>
<aop:aspect ref="timingAspectBean">
<aop:pointcut id="classTimingOperation" expression="within(@a.Timed *) and @target(timed)"/>
<aop:around method="time" pointcut-ref="classTimingOperation" />
<aop:pointcut id="methodTimingOperation" expression="@annotation(a.Timed) and @annotation(timed)" />
<aop:around method="time" pointcut-ref="methodTimingOperation" />
</aop:aspect>
</aop:config>





