江体小程序和zlb接口开发 #1
@@ -73,7 +73,7 @@ public class HttpService {
|
||||
CloseableHttpResponse response = null;
|
||||
String result = "";
|
||||
try {
|
||||
log.info("HTTP请求,请求地址===>{}, 请求头===>{}, 请求参数===>{}", url, JSON.toJSONString(header), jsonParams);
|
||||
log.debug("HTTP请求,请求地址===>{}, 请求头===>{}, 请求参数===>{}", url, JSON.toJSONString(header), jsonParams);
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
httpPost.addHeader("Content-Type", "application/json");
|
||||
// 创建请求内容
|
||||
@@ -88,7 +88,7 @@ public class HttpService {
|
||||
}
|
||||
response = httpClient.execute(httpPost);
|
||||
result = EntityUtils.toString(response.getEntity(), "utf-8");
|
||||
log.info("【POST请求】 请求地址===>{}, 响应结果==={}", url, result);
|
||||
log.debug("【POST请求】 请求地址===>{}, 响应结果==={}", url, result);
|
||||
} catch (Exception e) {
|
||||
log.error("doPost异常", e);
|
||||
} finally {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<configuration scan="true">
|
||||
|
||||
<!-- 应用名称:和统一配置中的项目代码保持一致(小写) -->
|
||||
<springProperty scope="context" name="APP_NAME" source="spring.application.name" defaultValue="X_APP" />
|
||||
<springProperty scope="context" name="APP_NAME" source="spring.application.name" defaultValue="APP" />
|
||||
<contextName>${APP_NAME}</contextName>
|
||||
|
||||
<!--日志文件保留天数 -->
|
||||
|
||||
Reference in New Issue
Block a user