Client client = Client.create();
WebResource webResource = client.resource("URL");
ClientResponse response = (ClientResponse)webResource.type("application/json")
.put(ClientResponse.class, requestJson );
if(response.getStatus()==200){
System.out.println("Success");
///do some logic here
}
我正在批量实现此代码。对于每个匹配条件的记录,将调用此Web服务。这会影响批处理性能。如何避免这种影响。