问题:继承FilterSecurityInterceptor自定义Spring security拦截器,但是每次都拦截了css等静态资源,应该如何设置?

@Override
protected void configure(HttpSecurity http) throws Exception{
    http
              .authorizeRequests()
              .anyRequest().authenticated()
              .and()
              // 登录地址,成功跳转地址,登陆失败地址
              .formLogin().loginPage("/login")
              .defaultSuccessUrl("/",true)
              .failureUrl("/login?error")
              // 授予所有用户以上地址的访问权限
              .permitAll();

     // 设置可以iframe访问
    http.headers().frameOptions().sameOrigin();    
}         
 

相关文章:

  • 2021-06-05
  • 2021-05-31
  • 2021-08-01
  • 2022-01-17
  • 2021-12-28
  • 2021-06-03
  • 2021-12-24
猜你喜欢
  • 2022-12-23
  • 2022-01-31
  • 2021-09-12
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2023-03-21
相关资源
相似解决方案