我通过JAMon apis使用Spring AOP进行性能统计。
public class ServicePerformanceInterceptor extends JamonPerformanceMonitorInterceptor {
@Override
protected Object invokeUnderTrace(MethodInvocation invocation, Log logger) throws Throwable {
.
.
.
}和bean配置
<bean id="timingAdvice" class="com.example.logging.interceptor.ServicePerformanceInterceptor"/>
<aop:config>
<aop:advisor pointcut="execution(* com.example.resource.Resource.*(..))" advice-ref="timingAdvice"/>
</aop:config>但是流中的拦截器不会被调用。你能告诉我我错过了什么吗?
发布于 2014-01-15 18:27:58
弄清楚了,我需要将log4j属性设置为跟踪级别。否则它将无法调用。
https://stackoverflow.com/questions/20943463
复制相似问题