七步才子 3 жил өмнө
parent
commit
459bad335a

+ 29 - 19
manager/src/main/resources/application.yml

@@ -8,37 +8,35 @@ spring:
       max-file-size: 10MB
       max-request-size: 12MB
 
-  #mongodb数据库配置
   data:
     mongodb:
-      uri: mongodb://填写mongodb地址
+      uri: mongodb://iotkit:123456@192.168.100.118:27017/?authSource=iotkit
       database: iotkit
 
   elasticsearch:
     rest:
-      #使用内置es的配置
-      uris: http://127.0.0.1:9200
-      username:
-      password:
+      uris: http://192.168.100.118:9200
       connection-timeout: 10s
 
   redis:
-    #使用内置redis的配置
-    host: 127.0.0.1
+    host: 192.168.100.50
     port: 6379
     database: 0
-    password:
+    password: 5tgbNHY^
 
+  cache:
+    cache-names: foo,bar
+    caffeine:
+      spec: maximumSize=5000,expireAfterAccess=300s
   mvc:
     pathmatch:
       matching-strategy: ant_path_matcher
 
-#图片存储用的是阿里云oss,如果需要上传产品图片才需要配置
 aliyun:
-  bucketId: 填写阿里云bucketId
+  bucketId: iotkit-images
   endpoint: oss-cn-shenzhen.aliyuncs.com
-  accessKeyId: 填写阿里云accessKeyId
-  accessKeySecret: 填写阿里云accessKeySecret
+  accessKeyId: LTAI4FmGGouSnScYrGe7rQLA
+  accessKeySecret: 9S0xjffwmGW2B3HsE4Efw1TqUy8YXC
 
 sa-token:
   # token名称 (同时也是cookie名称)
@@ -56,11 +54,23 @@ sa-token:
   # 是否输出操作日志
   is-log: false
 
-#pulsar消息队列配置,需要进行配置
-pulsar:
-  broker: pulsar://pulsar broker地址:6650
-  service: http://pulsar 服务地址:8080
+security:
+  oauth2:
+    resource:
+      filter-order: 3
 
-#认证中心地址
 oauth2:
-  auth-server-url: http://127.0.0.1:8086
+  auth-server-url: http://127.0.0.1:8086
+
+pulsar:
+  broker: pulsar://192.168.100.66:6650
+  service: http://192.168.100.66:8080
+
+app:
+  systemRole: iot_system_user
+  aligenie:
+    push:
+      device:
+mqtt:
+  url: tcp:/192.168.100.118:1883
+

+ 6 - 12
protocol-gateway/emqx-component/src/main/java/cc/iotkit/comp/emqx/EmqxDeviceComponent.java

@@ -91,25 +91,19 @@ public class EmqxDeviceComponent extends AbstractDeviceComponent {
             }
             client = MqttClient.create(vertx, options);
 
-            // handler will be called when we have a message in topic we subscribe for
-            /*client.publishHandler(p -> {
-                log.info("Client received message on [{}] payload [{}] with QoS [{}]", p.topicName(), p.payload().toString(Charset.defaultCharset()), p.qosLevel());
-            });*/
-
             List<String> topics = mqttConfig.getSubscribeTopics();
             Map<String, Integer> subscribes = new HashMap<>();
 
-            subscribes.put("/sys/+/+/s/#", 1);
+            for (String topic : topics) {
+                subscribes.put(topic, 1);
+            }
+
+            /*subscribes.put("/sys/+/+/s/#", 1);
             subscribes.put("/sys/client/connected", 1);
             subscribes.put("/sys/client/disconnected", 1);
             subscribes.put("/sys/session/subscribed", 1);
-            subscribes.put("/sys/session/unsubscribed", 1);
+            subscribes.put("/sys/session/unsubscribed", 1);*/
 
-            //"/sys/+/+/s/#","/sys/client/disconnected"
-
-            /*for (String topic : topics) {
-                subscribes.put(topic, 1);
-            }*/
 
             // handler will be called when we have a message in topic we subscribe for
             client.publishHandler(p -> {

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
protocol-gateway/emqx-component/src/main/resources/component.js


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно