发起HTTP请求
try {
String url = "http://xxx";
RestTemplate restTemplate = new RestTemplate();
HashMap<String, String> params = new HashMap<>();
HttpHeaders httpHeaders = new HttpHeaders();
params.put("outBizId","1,2");
params.put("success","true");
String jsonString = JSONObject.toJSONString(params);
HttpEntity<String> request = new HttpEntity<>(params,httpHeaders);
restTemplate.postForEntity(url, request,String.class);
}catch (Exception e){
logger.error("异常:" + e.getMessage());
}