本地可以运行程序,但是用intellij idea编译器 build后,放到帆软编译就出错,查看数据集,一直在加载数据,然后最后出现空指针错误以下是处理接口返回数据的代码CloseableHttpClient httpClient = HttpClients.();
HttpPost httpPost = HttpPost();
httpPost.addHeader(,);
httpPost.addHeader(,);
Map map = HashMap();
map.put( , );
map.put( , );
map.put( , );
map.put( , );
map.put( , );
map.put( , );
JSONObject jsonString = JSONObject(map);
StringEntity entity = StringEntity(jsonString.toString(),);
httpPost.setEntity(entity);
CloseableHttpResponse response = ;
{
response = httpClient.execute(httpPost);
} (IOException e) {
e.printStackTrace();
}
HttpEntity responseEntity = response.getEntity();
System..println(+responseEntity);
String entityString = ;
{
entityString = EntityUtils.(responseEntity);
} (IOException e) {
e.printStackTrace();
}
Object datas = Object;
JSONObject jsonObject = JSONObject.(entityString);
(jsonObject.getInteger()!=){
datas=;
datas=;
datas=;
datas=;
datas=;
datas=;
datas=;
.=datas;
;
}
JSONArray array = JSON.((jsonObject.getString()));
Iterator<Object> iterator = array.iterator();
i=;
(iterator.hasNext()) {
JSONObject obj = (JSONObject) iterator.next();
(obj.get()!=&&obj.get()!=){
datas=obj.get().toString();
}
datas=;
(obj.get()!=&&obj.get()!=){
datas= obj.get().toString();
}
datas=;
(obj.get()!=&&obj.get()!=){
datas= obj.get().toString();
}
datas=;
(obj.get()!=&&obj.get()!=){
datas= obj.get().toString();
}
datas=;
(obj.get()!=&&obj.get()!=){
datas= obj.get().toString();
}
datas=;
(obj.get()!=&&obj.get()!=){
datas= obj.get().toString();
}
datas=;
(obj.get()!=&&obj.get()!=)
datas= obj.get().toString();
datas= ;
i++;
}
System..println(+datas+datas+datas+datas+datas+datas+datas);
System..println(+i);
.=datas;