首页 新闻 赞助 找找看

springsecrity中自定义登录的问题

0
悬赏园豆:10 [待解决问题]

springsecrity配置文件如下配置可以正常登录。

http .requestMatchers().antMatchers("/", "/auth/login","/logout","/oauth/authorize")
.and()
.authorizeRequests()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login")
.loginProcessingUrl("/auth/login")
.defaultSuccessUrl("/index")
.and().csrf().disable();
http.httpBasic().disable();

但是当 第二行中 http .requestMatchers().antMatchers("/", "/logout","/oauth/authorize")去掉"/auth/login" 提交登录的时候居然报404错误,有哪位大神知道原理吗

牧码人_hh的主页 牧码人_hh | 初学一级 | 园豆:192
提问于:2021-06-29 15:34
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册