接口拦截 日志打印 自定义异常输出
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user