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
The solution (deprecated!) is:
.logout() .logoutRequestMatcher(new AntPathRequestMatcher("/logout")) .logoutSuccessUrl("/login");
It is recommended to use POST instead of a GET request for security, as mentioned above.