SpringSecurity用户认证
点击跳转: https://blog.csdn.net/weixin_45737330/article/details/127104915
SpringSecurity用户授权
点击跳转: https://blog.csdn.net/weixin_45737330/article/details/127118820
SpringSecurity用户注销
文章目录
1、在配置类添加退出配置
//退出
http.logout().logoutUrl("/logout").logoutSuccessUrl("/hello.html").permitAll();
2、修改配置,登录成功跳转成功页面
3、成功页面添加超链接,和写设置退出路径
seccess.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
登录成功!
<a href="/logout">退出</a>
</body>
</html>
4、点击退出链接后,页面显示
hello.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
你好,恭喜你注销成功!
<a href="/login.html">登录</a>
</body>
</html>