java - Spring Security Custom Login Error -


I'm trying to add Spring security custom login (Java config) to my application, but a strange error pops up Does.

I have gone through and it works just fine. I'm not sure what is the issue with my application

error

due to:. Java.lang.IllegalArgumentException:? 'Log Error for' is not a valid redirect URL

Security Config

  @Configuration @EnableWebSecurity Public Square SecurityConfig Expands WebSecurityConfigurerAdapter {public @Autowired .. Zero Configuration (AuthenticationManagerBuilder Certification) Exception {authentication .inMemoryAuthentication () .withUser throws ("user") password ("password") roles ("user"); } @Override Protects Zero (HttpSecurity http) throws exceptions {http.authorizeRequests () antMatchers ("/", "/" about) permitAll (). Http .authorizeRequests () .antMatchers ("/ admin", "/ admin / **") HasRole ("Admin") .anyRequest () Authenticated () .and () .formLogin () .loginPage ("Login to") .permitAll (); }}  

LoginController

  @Controller public class LoginController {@RequestMapping (value = "Login to", method = RequestMethod.GET) Public String Log ViewView () {Return "Login"; } @RequestMapping (value = "login", method = RequestMethod.POST) public string login (@ModelAttribute login login) {return "home"; }}  

Just delete the exception of the comment code (HTTPEquery http) I request mapping to the value login Tried to connect with , but did not get help from this, am I missing here?

Your slash is missing.

  .login page ("login")  

  .login page ("/ login")  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -