tiger822 commented on issue #9847:
URL: https://github.com/apache/dubbo/issues/9847#issuecomment-1080292443
硬要改为2目的就没问题
`
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResponseEntity<V,T> extends LinkedHashMap<String,V> implements
Serializable {
private long id;
private int errCode;
private String message;
private T result;
public static <V,T> ResponseEntity<V,T> fromResult(long id, T val){
ResponseEntity<V,T> ret = new ResponseEntity<>();
ret.result = val;
ret.id=id;
return ret;
}
public static <V,T>ResponseEntity<V,T> fromErr(long id, int errCode,
String message){
ResponseEntity<V,T> ret=new ResponseEntity<>(id,errCode,message,(T)null);
return ret;
}
@JsonIgnore
public Map toMap(){
Map map= JsonUtils.fromJson(JsonUtils.toJsonString(this), HashMap.class);
return map;
}
}
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]