Why this Spring application with java-based configuration don't work properly

前端 未结 4 1536
忘了有多久
忘了有多久 2020-12-01 14:48

I started recently a project with the Spring framework with the ojective to develop it without none XML config file, only Java code.

In this current moment, I add th

4条回答
  •  悲&欢浪女
    2020-12-01 15:21

    I think the problem is that this:

    .loginPage("spring/index").permitAll()
    

    should be this:

    .loginPage("/spring/index").permitAll() //note the '/' at the beginning of the uri
    

提交回复
热议问题