Actually, this can be achieved using Spring Validation and JSR303.
- Expose a MethodValidationPostProcessor bean.
- Annotate your controller class with @Validated (org.springframework.validation.annotation.Validated)
- Use the JSR303 validation annotations on your MyEntity fields/methods.
- Annotate your RequestBody argument with @Valid (you've already done this in your example).
- Add an @ExceptionHandler method to handle MethodArgumentNotValidException. This can be done in the controller or in a @ControllerAdvice class.