Spring Boot how to return my own validation constraint error messages
问题 I need to have my own error response body when something goes wrong with my request and I am trying to use the @NotEmpty constraint message attribute to return the error message, This is my class that returns the error message using the body that I need: package c.m.nanicolina.exceptions; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.MissingServletRequestParameterException; import org.springframework.web.bind