9.4认证用户

自定义的登录页

9.4.3记住用户remember-me功能
/**
* 通过重载,配置如果通过拦截器保护请求
* @param http
* @throws Exception
*/
@Override
protected void configure(HttpSecurity http) throws Exception {
//添加默认登录页
// http.formLogin();

//自定义登录页
//设置记住用户四周
http.formLogin().loginPage("/login")
.and()
.rememberMe().tokenValiditySeconds(2419200).key("spittrKey");
}


9.4.4退出





posted @ 2021-01-21 09:02  _Shing  阅读(118)  评论(0)    收藏  举报