接口拦截 日志打印 自定义异常输出

This commit is contained in:
2024-03-06 19:12:45 +08:00
parent 245c7b706d
commit 45d9319811
4 changed files with 106 additions and 83 deletions

View File

@@ -71,7 +71,7 @@ public class DictController {
@Log("新增字典")
@ApiOperation("新增字典")
@PostMapping
@PreAuthorize("@el.check('dict:add')")
// @PreAuthorize("@el.check('dict:add')")
public ResponseEntity<Object> createDict(@Validated @RequestBody Dict resources){
if (resources.getId() != null) {
throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID");