Procházet zdrojové kódy

优化appfront 请求

吴学文 před 6 roky
rodič
revize
c6de656dfe

+ 2 - 1
AppFrontService/src/main/java/com/java110/app/smo/api/impl/ApiSMOImpl.java

@@ -31,7 +31,7 @@ public class ApiSMOImpl extends BaseComponentSMO implements IApiSMO {
 
 
         logger.debug("api请求头" + headers + ";请求内容:" + body);
         logger.debug("api请求头" + headers + ";请求内容:" + body);
         HttpMethod method = null;
         HttpMethod method = null;
-        String url = ServiceConstant.SERVICE_API_URL +"/api/"+ headers.get(CommonConstant.HTTP_SERVICE);
+        String url = ServiceConstant.SERVICE_API_URL + "/api/" + headers.get(CommonConstant.HTTP_SERVICE);
         if (CommonConstant.HTTP_METHOD_POST.equals(headers.get(CommonConstant.HTTP_METHOD))) {
         if (CommonConstant.HTTP_METHOD_POST.equals(headers.get(CommonConstant.HTTP_METHOD))) {
             method = HttpMethod.POST;
             method = HttpMethod.POST;
         } else if (CommonConstant.HTTP_METHOD_GET.equals(headers.get(CommonConstant.HTTP_METHOD))) {
         } else if (CommonConstant.HTTP_METHOD_GET.equals(headers.get(CommonConstant.HTTP_METHOD))) {
@@ -53,6 +53,7 @@ public class ApiSMOImpl extends BaseComponentSMO implements IApiSMO {
         }
         }
 
 
         HttpEntity<String> httpEntity = new HttpEntity<String>(body, header);
         HttpEntity<String> httpEntity = new HttpEntity<String>(body, header);
+        logger.debug("请求后端url" + url);
 
 
         ResponseEntity<String> responseEntity = restTemplate.exchange(url, method, httpEntity, String.class);
         ResponseEntity<String> responseEntity = restTemplate.exchange(url, method, httpEntity, String.class);
         logger.debug("api返回信息" + responseEntity);
         logger.debug("api返回信息" + responseEntity);