我定义了两个方面 功能上 一个@control类。
一个是 @Cacheble (Ehcache Spring 批注, 使用 Spring AOP) 。
另一个是计算执行时间的周围建议。 这是 AspectJ 汇编时间的方面 。
When the method is called for the first time, both of the aspect is being executed. But, for all the subsequent call, only @Cacheble aspect is intercepted. Another advice (that computes execution time) is not being intercepted. Why is this not being intercepted? I ve set @Order for both aspects, but that doesn t help.
计算执行时间的第二个方面如下:
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Order(value = 0)
public @interface MonitorPerformance {
}
Dispathcher-servlet.xml has
<ehcache:annotation-driven create-missing-caches="true"
cache-manager="ehCacheManager"
order="1"/>
Looking forward to your suggestions.
谢谢