@Validated
Learn @Validated (Validation, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes @Validated ( org.springframework.validation.annotation.Validated ) is Spring own variant of @Valid that also supports validation groups . On a class , it enables method validation, so constraints on @RequestParam , @PathVariable and service arguments are checked. Failure on method parameters throws ConstraintViolationException (not a binding error), which you map to 400 yourself.