I am NOT using Spring Boot, but I want to be able to turn on/off debugging with YAML such as:
debug: true
Instead of:
@EnableWebSecurity(debug = true)
You can do it using the WebSecurityConfigurerAdapter and WebSecurity#debug.
@Value("${isDebugEnable}")
private Boolean isDebugEnable;
public void configure(WebSecurity web) throws Exception {
web
.debug(isDebugEnable)
. //...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With