0

I am using Spring 4.2.5, Jersey 2.22.2, Tomcat 8.0, io.dropwizard.metrics 3.1.2, metrics-spring 3.1.2

I am using @Timed annotation and found that for the method invocation, there are two TimedMethodInterceptor in the interceptorsAndDynamicMethodMatchers. It ends up the count doubles the real method invocation.

If I run the same webapp using Jetty Runner in Intellij IDEA, I don't see the problem. Any clue?

Just debugged a bit, there two BeanPostProcessors with Timed annotations. enter image description here

4

1 回答 1

0

我终于弄清楚是什么原因造成的。Tomcat 解压 war 文件并在 Catalinahome/webapps 和 Catalinahome/work 目录中创建目录,这以某种方式导致了问题。如果我将 unpackWARs 属性设置为“false”,问题就消失了。

于 2016-04-22T21:13:32.770 回答