spring boot+spring security 自定义登录界面失效 及静态资源失效
1.静态资源失效
在config中加入后,重启Idea
@Override
protected void configure(HttpSecurity http) throws Exception {
//静态资源
http.requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll()
} @Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/static/**");
}
一般重启idea后问题都会解决
反正我是重启后解决的问题
2.自定义登录验证页面失效的问题
我的原因就是因为
在loginProcessingUrl() 中的请求url没有对应我的form表单
而且写错了也不会报错什么的,就一直在login页面