spring-security——web权限方案:用户退出
本文最后更新于:2022年5月20日 下午
摘要:使用Spring Security完成用户退出功能
用户注销
开发步骤
- 在配置类中添加退出的配置
- 配置退出路径
1 |
|
- 修改登录成功后跳转页面路径
1 |
|
1 |
|
- 添加登录成功后跳转页面
- 在/resources/static文件夹下添加success.html
1 |
|
- 在【TestController】中添加一个方法,退出后返回该页面
1 |
|
- 测试
- 登录页面

- 使用root用户登录


- 重新访问登录页面使用root用户进行登录后退出


spring-security——web权限方案:用户退出
https://shgang97.github.io/posts/spring-security-web2-a56e3203d130/