[Solved] spring boot security Start Error: ‘login.html?error‘ is not a valid redirect URL

Configure custom login page

http.formLogin().loginPage("login.html")  //Custom login page The error is caused by this, the page needs to be preceded by a slash
                .loginProcessingUrl("/login") // the address of the action in the login form, which is the path of the authentication request
                .defaultSuccessUrl("/home"); //Default jump path after successful login

Change to


Read More: