springSecurity 怎么实现让拦截器不拦截后端登录接口呢?

img
我现在使用的是OncePerRequestFilter拦截器,拦截token失效等情况后想跳转到login页面让用户重新登录,后台的登录接口还是因为无token被拦截,请问应该怎么配置才能实现这种效果呢?
img

    http.authorizeRequests()
            .antMatchers("/hello").permitAll() //允许任何人访问
            .anyRequest().authenticated()//其他的路径都是登录后才可访问
            .and()
            /*登录配置*/
            .formLogin()
            .loginPage("/login")//登录页,当未登录时会重定向到该页面
            .loginProcessingUrl("/login")//前端登录请求地址
            .permitAll()
            .and()
            .cors() //跨域
            .and()
            //关闭csrf防护,类似于防火墙,不关闭上面的设置不会真正生效。
            .csrf().disable();

把token的验证放到login之后试试

img