Bladeren bron

机构类型

TRX 1 jaar geleden
bovenliggende
commit
0360dcd420

+ 1 - 1
FullCardServer/src/main/java/com/zhongshu/card/server/core/httpRequest/ApiRequestService.java

@@ -55,7 +55,7 @@ public class ApiRequestService extends SuperService {
         stopWatch.start();
         try {
             String json = JSONUtil.toJsonStr(data);
-            String url = iotCenterConf.getUrl() + apiConfParam.getApiName();
+            String url = iotCenterConf.getUrl() + iotCenterConf.getIotserverName() + apiConfParam.getApiName();
             ResponseModel request = HttpClientUtil.request(HttpModel.builder()
                     .url(url).method(apiConfParam.getMethodType()).charset("utf-8").body(data).build());
             if (request.getCode() == 200) {

+ 2 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/httpRequest/conf/IotCenterConf.java

@@ -16,4 +16,6 @@ public class IotCenterConf {
      * 物联网平台地址配置
      */
     private String url = "";
+
+    private String iotserverName = "";
 }

+ 1 - 0
FullCardServer/src/main/resources/application-dev.yml

@@ -69,6 +69,7 @@ oss:
 # 物联网平台的配置
 iotcenter:
   url: http://172.24.50.53:9101
+  iotserverName: # 服务名称
 
 #logging:
 #  level: