Bladeren bron

更新!11

TRX 1 jaar geleden
bovenliggende
commit
9d569a3123

+ 1 - 2
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/artemis/ArtemisListenerService.java

@@ -54,7 +54,7 @@ public class ArtemisListenerService {
             if (!topicName.equals("$sys.mqtt.sessions")) {
                 return;
             }
-            log.info("==sezz {}", session.getTransacted());
+
             String messageId = message.getJMSMessageID();
             String clientId = message.getStringProperty("_AMQ_LVQ_NAME");
             log.info("receiveMessage {} 消息监听clientId: {}", messageId, clientId);
@@ -77,7 +77,6 @@ public class ArtemisListenerService {
             // 处理消息,解析出会话信息
             String sessionInfo = new String(bytes, "gbk");
             log.info("-------------------: {} {}", sessionInfo, sessionInfo.length());
-
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 14 - 0
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/device/GateWayUserInfoService.java

@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
+import org.springframework.util.StopWatch;
 
 import java.util.Date;
 import java.util.List;
@@ -74,12 +75,25 @@ public class GateWayUserInfoService extends SuperService {
      */
     public void initData() {
         log.info("GateWayUserInfoService initData");
+        StopWatch stopWatch = new StopWatch();
+        stopWatch.start("initDefaultUser");
         // 初始默认用户密码
         initDefaultUser();
+        stopWatch.stop();
 
+        stopWatch.start("refreshAllGateWayUser");
         jmxSyncService.refreshAllGateWayUser();
+        stopWatch.stop();
+
+        stopWatch.start("refreshAllGateWaySecurity");
         jmxSyncService.refreshAllGateWaySecurity();
+        stopWatch.stop();
+
+        stopWatch.start("refreshAllDirectDevice");
         jmxSyncService.refreshAllDirectDevice();
+        stopWatch.stop();
+
+        log.info(stopWatch.prettyPrint());
     }
 
     /**