Mic*_*son 3 spring spring-security
我没有使用Spring Boot,但是我希望能够使用YAML打开/关闭调试,例如:
debug: true
Run Code Online (Sandbox Code Playgroud)
代替:
@EnableWebSecurity(debug = true)
Run Code Online (Sandbox Code Playgroud)
您可以使用WebSecurityConfigurerAdapter和进行操作WebSecurity#debug。
@Value("${isDebugEnable}")
private Boolean isDebugEnable;
public void configure(WebSecurity web) throws Exception {
web
.debug(isDebugEnable)
. //...
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
420 次 |
| 最近记录: |