Browse Source

no message

wwd 3 years ago
parent
commit
b4e84f23ec

+ 8 - 9
src/main/java/com/persagy/ztkedgeclouddatasecurity/netty/cloud/CenterClientHandler.java

@@ -57,17 +57,16 @@ public class CenterClientHandler extends SimpleChannelInboundHandler<NettyMessag
     public void channelActive(ChannelHandlerContext ctx) throws Exception {
         log.info(location+">>>Connected to: {}", ctx.channel().remoteAddress());
         //建立连接
-        nettyClient.sendMessage(new NettyMessage("",200,"Pj4403070003","ZS"));
+       //nettyClient.sendMessage(new NettyMessage("",200,"Pj4403070003","ZS"));
         //启动的时候发送消息,获取全部报警定义
-        NettyMessage nettyMessage = new NettyMessage("",4,"Pj4403070003","ZS");
-        JSONObject content = new JSONObject();
-        content.put("groupCode", CommonConst.groupCode);
-        content.put("projectId", CommonConst.projectId);
-        nettyMessage.setContent(Arrays.asList(content));
-        nettyClient.sendMessage(nettyMessage);
-
+       // NettyMessage nettyMessage = new NettyMessage("",4,"Pj4403070003","ZS");
+//        JSONObject content = new JSONObject();
+//        content.put("groupCode", CommonConst.groupCode);
+//        content.put("projectId", CommonConst.projectId);
+//        nettyMessage.setContent(Arrays.asList(content));
+//        nettyClient.sendMessage(nettyMessage);
         //内存中缓冲的未发送成功的数据发送出去
-        iniAlarmResult(ctx);
+       // iniAlarmResult(ctx);
     }
 
     private void iniAlarmResult(ChannelHandlerContext ctx) {

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

@@ -1,5 +1,5 @@
 server:
-  port: 8091
+  port: 8090
 listener:
   cloud1: 1:Pj4403050019:192.168.0.26:9986
   port:  1:Pj4403050019:192.168.0.35:30091

+ 1 - 1
src/main/resources/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
     active: dev
-  location: Cloud  # Edge 边缘测 or Cloud 云端
+  location: Edge  # Edge 边缘测 or Cloud 云端