@PreAuthorize 注解 方法前拦截判断是否有权限
上图得知
进入方法前判断el表达式
例如
@PreAuthorize("hasAuthority('delete:Role_admin')")
可以从SecurityExpressionRoot类中看到
el表达式返回true 通过 false 拒绝访问 403
验证流程:
对上述el表达式 可以自定义
例如:@PreAuthorize("@oops.hasPermission('generator_baseaddress_del')" )
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。