Spring Security — Redirect based on User Roles
How to redirect URL base on user roles
Published in
1 min readOct 2, 2019
Security Configuration Class :
.defaultSuccessUrl(“/home”, true) // is used to redirect user to the url after the user have been authorized successfully. But since this option is not base on user roles. So we come up with other option : .successHandler(authenticationSuccessHandler)