Showing
1 changed file
with
10 additions
and
0 deletions
| @@ -82,6 +82,16 @@ public class GlobalExceptionHandler { | @@ -82,6 +82,16 @@ public class GlobalExceptionHandler { | ||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | 84 | ||
| 85 | + @ExceptionHandler(value = BusinessException.class) | ||
| 86 | + @ResponseStatus(HttpStatus.BAD_REQUEST) | ||
| 87 | + public ResultBean handleBusinessException(BusinessException e) { | ||
| 88 | + | ||
| 89 | + | ||
| 90 | + return responseException(e.getErrorCode() + REQUEST_PARAMS_IS_NOT_EMPTY, e); | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + | ||
| 94 | + | ||
| 85 | 95 | ||
| 86 | @ExceptionHandler(value = MissingServletRequestParameterException.class) | 96 | @ExceptionHandler(value = MissingServletRequestParameterException.class) |
| 87 | @ResponseStatus(HttpStatus.BAD_REQUEST) | 97 | @ResponseStatus(HttpStatus.BAD_REQUEST) |
-
Please register or login to post a comment