Java-JSON.toJSONString(request) 谨慎使用
JSON.toJSONString(request) 慎重转这种对象,内部会调用一些方法而一些字段未初始化导致报错
public String getAddress() {
StringBuilder urlBuilder = new StringBuilder();
String endPoint = this.getEndPoint();
urlBuilder.append(endPoint);
if (endPoint.endsWith("/openApi")) {
urlBuilder.append("/");
} else if (!endPoint.endsWith("/openApi/")) {
urlBuilder.append("/openApi/");
}
String version = this.getQpaasVersion();
if (null != version && !"".equals(version)) {
urlBuilder.append(this.getQpaasVersion());
urlBuilder.append("/");
}
urlBuilder.append(this.getActionName());
return urlBuilder.toString();
}
正文到此结束