举个例子:
@SpringBootApplication(
exclude = SecurityAutoConfiguration.class
)
然而,这并不妨碍
MethodSecurityInterceptor
从踢进来,接着是
AuthenticationCredentialsNotFoundException
.
有没有一种方便的方法可以在不删除所有注释的情况下禁用方法安全性?
编辑:
我说的是
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
然后
@PreAuthorize("hasAuthority('SOME_AUTHORITY')")
编辑2:
Caused by: java.lang.IllegalStateException: In the composition of all global method
configuration, no annotation support was actually activated