Showing
1 changed file
with
10 additions
and
0 deletions
| @@ -63,6 +63,16 @@ public class GlobalExceptionHandler { | @@ -63,6 +63,16 @@ public class GlobalExceptionHandler { | ||
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | 65 | ||
| 66 | + @ExceptionHandler(value = BusinessException.class) | ||
| 67 | + @ResponseStatus(HttpStatus.BAD_REQUEST) | ||
| 68 | + public ResultBean handleBusinessException(BusinessException e) { | ||
| 69 | + | ||
| 70 | + | ||
| 71 | + return responseException(e.getErrorCode() + REQUEST_PARAMS_IS_NOT_EMPTY, e); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + | ||
| 66 | 76 | ||
| 67 | @ExceptionHandler(value = MissingServletRequestParameterException.class) | 77 | @ExceptionHandler(value = MissingServletRequestParameterException.class) |
| 68 | @ResponseStatus(HttpStatus.BAD_REQUEST) | 78 | @ResponseStatus(HttpStatus.BAD_REQUEST) |
-
Please register or login to post a comment