Reputation: 2427
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)
Upvotes: 3
Views: 1169
Reputation: 1852
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)
. //...
}
Upvotes: 5