Spring security : Redirect to previous url after logout
问题 I've got a web app that uses spring security. I'm wanting to redirect the user back to the same page they were on before log out when they log out. Is there an easy way to do this? 回答1: You can add a new filter in the filter chain of the spring security. That new filer will be applied to the /logout URL. When going trough this filter you can save the current page in a field variable. And when returning through the filter. You can redirect the request to the saved URL. I think this can help.