result.setErrorMsgMap(true) true报错
if (constraintViolationSet.size()>0){ //有错误 result.setErrorMsgMap(true); constraintViolationSet.forEach(constraintViolation->{ String errMsg =constraintViolation.getMessage(); String propertyName=constraintViolation.getPropertyPath().toString(); result.getErrorMsgMap().put(propertyName,errMsg); }); } 其中result.setErrorMsgMap(true) true报错