Spring boot 2.x configuration custom interceptor will intercept static resources
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new InterceptorConfig()).addPathPatterns("/**").
excludePathPatterns("/","/index","/admin/user/login",
"/bootstrap/**","/layui/**");
}