I have an endpoint with a @Valid @RequestBody MyPojo pojo
argument. When I call the endpoint and trigger a javax.validation
failure, the request properly returns with a status 400. However, the response body is empty.
I can add a org.springframework.validation.Errors
argument to my endpoint, handle the validation errors myself, and return them to the user. But can I get Spring to just do that out of the box? Why do I need to implement part of its built in validation manually?