标签:
@Configuration public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new YourInterceptor()).addPathPatterns("/xx/**")//要拦截的请求
.excludePathPatterns("/xxx/*");//不拦截的请求
} }
标签:
原文地址:http://www.cnblogs.com/oyx305/p/5526758.html