public void uploadFileOrg(NowDateDto nowDateDto){ CloseableHttpClient httpclient = HttpClients.createDefault(); long stateTime = System.currentTimeMillis(); log.info("开始调用article定时任务生成文章,当前系统时间==={}",stateTime); try { HttpPost httppost = new HttpPost(clockAuditArticle); RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(200000) .setSocketTimeout(200000).build(); httppost.setConfig(requestConfig); Map<String, String> paramMap = new HashMap<String, String>(); paramMap.put("nowDate",nowDateDto.getNowDate()); httppost.setEntity(new StringEntity(JSONObject.toJSONString(paramMap), ContentType.create("application/json", "utf-8"))); httppost.setHeader("Authorization","aggregete"); httppost.setHeader("Content-Type", "application/json"); CloseableHttpResponse response = httpclient.execute(httppost); try { HttpEntity resEntity = response.getEntity(); if (resEntity != null) { log.info("调用article定时任务生成文章成功,用时====={}",System.currentTimeMillis()-stateTime); String responseEntityStr = EntityUtils.toString(response.getEntity()); System.out.println("--上传返回信息--"+responseEntityStr); }else{ throw new AppBusinessException(UserErrorCode.UPLOAD_ERROR); } EntityUtils.consume(resEntity); } finally { response.close(); } } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { try { httpclient.close(); } catch (IOException e) { e.printStackTrace(); } } }