class WebMvcConfig extends WebMvcConfigurationSupport {
@Override
protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new SecurityIntercepter(ac)).excludePathPatterns("/tokens").addPathPatterns("/**");
super.addInterceptors(registry);
}
}
这里面添加拦截器,拦截不到url。请问原因
使用的是xml零配置之WebMvcConfigurationSupport,也就是相当于MVC的配置文件。里面重写了addInterceptors。