有没有一种方法可以使用我的config.properties中的布尔securityEnabled禁用全局方法安全性?任何其他方法?谢谢。禁用EnableGlobalMethodSecurity注释
@EnableWebSecurity @EnableGlobalMethodSecurity(securedEnabled =真) @PropertySource( “类路径:config.properties”)公共类 SecurityConfig扩展WebSecurityConfigurerAdapter {
@Value( “$ {} securityconfig.enabled”) private boolean securityEnabled;
...
}
你必须通过注释办呢?有简单的方法如何在XML配置文件中做到这一点 – shark
我宁愿使用我所有的配置与春天java配置 –