036c0a2d by chentao

no message

1 parent a0d2f4d1
...@@ -186,7 +186,8 @@ public class GlobalExceptionHandler { ...@@ -186,7 +186,8 @@ public class GlobalExceptionHandler {
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 System.out.println("=============="+e.getMessage());
189 log.error(e.getMessage()); 189 log.error(e.getBindingResult().getObjectName());
190 log.error(e.getBindingResult().getFieldError().getField());
190 String message = e.getBindingResult().getFieldError().getDefaultMessage(); 191 String message = e.getBindingResult().getFieldError().getDefaultMessage();
191 return R.fail(message); 192 return R.fail(message);
192 } 193 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!