no message
Showing
1 changed file
with
1 additions
and
3 deletions
| ... | @@ -185,9 +185,7 @@ public class GlobalExceptionHandler { | ... | @@ -185,9 +185,7 @@ public class GlobalExceptionHandler { |
| 185 | */ | 185 | */ |
| 186 | @ExceptionHandler(MethodArgumentNotValidException.class) | 186 | @ExceptionHandler(MethodArgumentNotValidException.class) |
| 187 | public R<Void> handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { | 187 | public R<Void> handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { |
| 188 | System.out.println("=============="+e.getMessage()); | 188 | log.error(e.getMessage()); |
| 189 | log.error(e.getBindingResult().getObjectName()); | ||
| 190 | log.error(e.getBindingResult().getFieldError().getField()); | ||
| 191 | String message = e.getBindingResult().getFieldError().getDefaultMessage(); | 189 | String message = e.getBindingResult().getFieldError().getDefaultMessage(); |
| 192 | return R.fail(message); | 190 | return R.fail(message); |
| 193 | } | 191 | } | ... | ... |
-
Please register or sign in to post a comment