From a9b32ed7fc830d1491b33cf6503ebc0b92deb4e9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 16 Jul 2020 17:37:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=85=B7=E4=BD=93=E9=94=99?= =?UTF-8?q?=E8=AF=AFcode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/utils/HttpClientManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java index 261153eea7..2b48025317 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java @@ -29,7 +29,6 @@ import org.springframework.util.CollectionUtils; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.io.ByteArrayOutputStream; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; @@ -190,7 +189,8 @@ public class HttpClientManager { String result = EntityUtils.toString(response.getEntity()); return new Result().ok(result); } else { - log.warn("execute http method fail,httpStatus:{0}", response.getStatusLine().getStatusCode()); + log.warn("execute http method fail,httpStatus:{}", response.getStatusLine().getStatusCode()); + return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(),"请求失败httpStatus:"+response.getStatusLine().getStatusCode()); } } } catch (Exception e) {