Spring Security is hard to debug and hard to test. Make your life easier with significantly better log output by using debug = true
in the EnableWebSecurity
annotation:
@EnableWebSecurity(debug = true)
public class CustomConfig extends WebSecurityConfigurerAdapter {
// your config here
}
Don't use this in production!
Top comments (2)
It is better to handle this via a property in your
WebSecurityConfigurerAdapter
Thanks for writing this one down. The information is out there of course, but I have worked with Spring Security for so long not knowing about this switch.