首页 新闻 赞助 找找看
1
回答数

待解决问题 40 springboot整合security 权限注解@PreAuthorize在controller中方法上有效,在service接口层上无效

如题,在controller中方法上使用@PreAuthorize("hasAnyRole('USER')") 可以正常处理权限,但是在service中方法上就无效