
com.tqdev.metrics.spring.loaders.HandlerInterceptorLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metrics-spring-loaders Show documentation
Show all versions of metrics-spring-loaders Show documentation
Package to scan for components in order to instrument a Spring application.
The newest version!
package com.tqdev.metrics.spring.loaders;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import com.tqdev.metrics.core.MetricRegistry;
import com.tqdev.metrics.spring.webmvc.MvcDurationInterceptor;
@Configuration
public class HandlerInterceptorLoader extends WebMvcConfigurerAdapter {
@Autowired
private MetricRegistry metricRegistry;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new MvcDurationInterceptor(metricRegistry));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy