Logout link with Spring and Thymeleaf

后端 未结 6 1274
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-03 23:23

According with the official example (Secure Web Content), I have to use a form and a button with the aim to perform a logout with Spring Security. Is there a way to use a li

6条回答
  •  -上瘾入骨i
    2021-01-03 23:45

    You have to use a form for log out. If you really want a link, you can use JavaScript to have the link perform a POST on a hidden form.

     Logout
    
       

提交回复
热议问题