CodePudding user response:
Catch this exception@ ExceptionHandler (InvalidFormatException. Class)
Public R handHttpConverterException (InvalidFormatException e) {
String errors="";
ListPath=um participant etPath ();
For (JsonMappingException. Reference Reference: path) {
Errors +="parameter name:" + reference. GetFieldName () + "enter illegal, need is" + um participant etTargetType (). The getName () + "type," + "submit values are:" + um participant etValue (), toString ();
The info (" parameter name: {} ", the reference getFieldName ());
}
The info (" submit parameter values: {} ", um participant etValue (). The toString ());
Log. The info (" need parameter types: {} "+ um participant etTargetType () getName ());
Return R.e rror (errors);
}