I\'m trying to setup the logut of my application with j_spring_security_logout but for some reason it\'s not working, I keep getting a 404 error.
I\'m calling the fu
With spring security 4 Logout has to be done through form button. CSRF token has to be submitted along. j_spring_security_logout does not work any longer. After spending one day i got following to be working.
Step 1: In your JSP page
Step 2
Step 3 In your login controller
//Logout mapping
@RequestMapping("/logout")
public String showLoggedout(){
return "logout";
}
Step 4 You must have one logout.jsp
Important to see that it will land onto login page after logout.
So this login page must be there with corresponding mappping to login.jsp or whatever to map in your controller.