當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
[SpringSecurity]web权限方案_用户注销
生活随笔
收集整理的這篇文章主要介紹了
[SpringSecurity]web权限方案_用户注销
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
用戶注銷
在配置類中添加退出映射地址
//退出http.logout().logoutUrl("/logout").logoutSuccessUrl("/test/hello").permitAll();測試
- 修改配置類,登陸成功之后跳轉到成功頁面
- 在成功頁面添加超鏈接,寫設置退出路徑
success.html:
<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>Title</title> </head> <body>登陸成功 <a href = "/logout">退出</a></body> </html>登陸成功之后,在成功頁面點擊退出,再去訪問其他controller嗎,不能進行訪問的
總結
以上是生活随笔為你收集整理的[SpringSecurity]web权限方案_用户注销的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 源码实现 --> atoi函数实现
- 下一篇: [SpringSecurity]web权