I'm implementing micrometer to spring web project. While trying to add @Timed annotation. Prior to add @Timed i'm supposed to create TimedSpect bean. But it says could not autowire no bean of MeterRegistry type found
@Configuration
public class MetricsCofiguration {
@Bean
public TimedAspect timedAspect(MeterRegistry registry) {
return new TimedAspect(registry);
}
}
Not sure if you still need this answer but this is what i tried and its working fine.
Make sure you have below starter dependency in your pom.