metrics-spring icon indicating copy to clipboard operation
metrics-spring copied to clipboard

Detect annotations on interfaces

Open gquintana opened this issue 10 years ago • 2 comments

If the @Timed annotation is placed on the interface, the aspect isn't awoken (annotation must be placed on the implementation class).

This is problematic if you want to monitor Spring Data's repositories where there is no implementation.

In AnnotationFilter#matches, you should use Spring's AnnotationUtils#findAnnotation (or something like that) instead of method.isAnnotationPresent(clazz)

Tested on 3.0.1

gquintana avatar Jun 24 '14 12:06 gquintana