0

我正在使用 Spring AOP 与 JAMon api 进行性能统计。

    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>

但是在流拦截器中没有被调用。你能告诉我我错过了什么吗?

4

1 回答 1

0

想通了,我需要将 log4j 属性设置为跟踪级别。否则它将无法调用。

于 2014-01-15T10:27:58.143 回答