我无法hasRole在@PreAuthorize注释中使用方法.也request.isUserInRole(“ADMIN”)给出了false.我错过了什么?虽然.hasAuthority(“ADMIN”)工作正常.
hasRole
@PreAuthorize
request.isUserInRole(“ADMIN”)
false
.hasAuthority(“ADMIN”)
我正在从数据库为用户分配权限.
spring-security spring-boot
spring-boot ×1
spring-security ×1