Return list of errors
问题 I wan to return a list of errors using this Response object: public class StringResponseDTO { private String response; public StringResponseDTO(String response) { super(); this.response = response; } public String getResponse() { return response; } public void setResponse(String response) { this.response = response; } } I use this code to generate errors: List<FieldError> errors = result.getFieldErrors(); for (FieldError error : errors ) { System.out.println ("Validation error in field: " +