Created
July 17, 2019 07:33
-
-
Save KiryhaPikoff/4d49fc52db1bef1c8b79e31fbb08b39e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ResponseBody | |
@ExceptionHandler(MethodArgumentNotValidException.class) | |
public ResponseEntity<List<ObjectError>> processValidationError(HttpServletRequest httpServletRequest, MethodArgumentNotValidException manve) throws MethodArgumentNotValidException { | |
return new ResponseEntity<>(manve.getBindingResult().getAllErrors(), HttpStatus.BAD_REQUEST); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment