Describe the bug The introduction of Spring Security causes the request path to be abnormal
To Reproduce After inheriting WebSecurityConfigurerAdapter rewrite the configure (HttpSecurity HTTP) function,
Http.authorizerequests ().antmatchers (httpmethod.post,"/login").permitall (),
There is no problem accessing "/login" after that, but after I declare another @requestMapping (value = "/logout") function,
Every time you access host:port/logout, it will be forwarded to "/login" and will be forwarded by get.I can access it again after changing '/logout' to '/ XXX',
I'm sure I was authenticated,I'm sure there's no extra configuration,It is strange that
Expected behavior
Be able to access correctly
Sample
Reports that include a sample will take priority over reports that do not. At times, we may require a sample, so it is good to try and include a sample up front.