Catalysts / cat-boot

CAT-Boot: A set of libraries on top of the famous and fabolous Spring Boot
Apache License 2.0
23 stars 16 forks source link

RestController is not monitored #33

Open evernat opened 8 years ago

evernat commented 8 years ago

In JavaMelodyAutoConfiguration, I suggest to add the following code, otherwise controllers with @RestController are not monitored

@ConditionalOnProperty(name = "javamelody.enableSpringControllerMonitoring", havingValue = "true")
@Bean
public MonitoringSpringAdvisor springRestControllerMonitoringAdvisor() {
    final MonitoringSpringAdvisor interceptor = new MonitoringSpringAdvisor();
    interceptor.setPointcut(new AnnotationMatchingPointcut(RestController.class));
    return interceptor;
}