Skip to main content

Validation Exceptions

Learn Validation Exceptions (Exception Handling, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Validation exceptions are thrown when request data breaks constraints such as @NotBlank or @Min . Body validation : @Valid @RequestBody failing throws MethodArgumentNotValidException , which carries a BindingResult . Parameter validation : constraints on @RequestParam or @PathVariable need @Validated on the class and throw ConstraintViolationException .

More lessons in Exception Handling