From b1748f1ae4100292642cf5b8f2a007e08e2a05ca Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 2 Sep 2024 16:40:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml index 2c378f0..4598ce0 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap-sgzb_nw_local.yml @@ -38,4 +38,5 @@ sgzb: job: settlementJobDay: 1 settlementJobCron: "0 0 1 1 * ?" + zlptUrl: http://test-rental.zhgkxt.com/proxy/item-center/supply/item/pushNotifications From ccf30659f4f367a83e5a38c5d6208db5bb99981a Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Wed, 4 Sep 2024 09:37:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bonus/sgzb/common/core/utils/HttpHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/utils/HttpHelper.java b/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/utils/HttpHelper.java index d19db4c..f05f5a4 100644 --- a/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/utils/HttpHelper.java +++ b/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/utils/HttpHelper.java @@ -41,16 +41,16 @@ public class HttpHelper { System.out.println("JSONBody-=========:" + JSONBody); CloseableHttpClient httpClient = HttpClients.createDefault(); HttpPost httpPost = new HttpPost(url); - httpPost.addHeader("Content-Type", "application/json"); + httpPost.addHeader("Content-Type", "application/json; charset=UTF-8"); if (!CollectionUtils.isEmpty(headerMap)) { for (Map.Entry entry : headerMap.entrySet()) { httpPost.addHeader(entry.getKey(), entry.getValue()); } } - httpPost.setEntity(new StringEntity(JSONBody)); + httpPost.setEntity(new StringEntity(JSONBody,StandardCharsets.UTF_8)); CloseableHttpResponse response = httpClient.execute(httpPost); HttpEntity entity = response.getEntity(); - String responseContent = EntityUtils.toString(entity, "UTF-8"); + String responseContent = EntityUtils.toString(entity, StandardCharsets.UTF_8); response.close(); httpClient.close(); return responseContent;