正确写法:
“/check”为登录的post请求
@Override
public void addInterceptors(InterceptorRegistry registry) {
//添加拦截器
//静态资源及post请求放行
registry.addInterceptor(new LoginInterceptor()).excludePathPatterns("/css/**","/js/**","/images/**","/check");
}
错误写法:
registry.addInterceptor(new LoginInterceptor()).excludePathPatterns("/static/**");