有没有办法可以使用我的 config.properties 中的 boolean securityEnabled 禁用全局方法安全性?还有其他方法吗?
@EnableWebSecurity
@EnableGlobalMethodSecurity(securedEnabled=true)
@PropertySource("classpath:config.properties")
public class SecurityConfig
extends WebSecurityConfigurerAdapter {
@Value("${securityconfig.enabled}")
private boolean securityEnabled;
...
}
Run Code Online (Sandbox Code Playgroud)