01f96122 by chentao

no message

1 parent 210c8460
...@@ -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 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!