Spring-Security基于源码扩展-自定义授权注解(二十五)
自定义相关授权注解,正常情况不用自定义。支持el比如
@PostMapping("/create") @Operation(summary = "新增字典数据") @PreAuthorize("@ss.hasPermission('system:dict:create')") public CommonResult<Long> createDictData(@Valid @RequestBody DictDataSaveReqVO createReqVO) { Long dictDataId = dictDataService.createDictData(createReqVO); return success(dictDataId); }