소스 검색

防止重复数据 入队列

zjs 4 일 전
부모
커밋
768a833a6f

+ 2 - 2
src/main/java/com/cn/esermis/EsermisApplication.java

@@ -26,8 +26,8 @@ public class EsermisApplication  implements CommandLineRunner {
26 26
         /**
27 27
          * 使用异步注解方式启动netty服务端服务
28 28
          */
29
-        new BootNettyServer().bind(19900);
30
-//        new BootNettyServer().bind(8088);
29
+//        new BootNettyServer().bind(19900);
30
+        new BootNettyServer().bind(8088);
31 31
     }
32 32
 
33 33
 }

+ 2 - 2
src/main/java/com/cn/esermis/netty/BootNettyChannelInboundHandlerAdapter.java

@@ -81,8 +81,8 @@ public class BootNettyChannelInboundHandlerAdapter extends ChannelInboundHandler
81 81
 //            if (message.contains(Constant.MINUTE_STR) || message.contains(Constant.HOUR_STR)) {
82 82
                 log.info("=============" + (new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(new Date()) + "=============");
83 83
                 log.info("收到数据:" + message);
84
-                String reply = HJ212MsgUtils.reply(message);
85
-                ctx.writeAndFlush(reply);
84
+//                String reply = HJ212MsgUtils.reply(message);
85
+//                ctx.writeAndFlush(reply);
86 86
 //            }
87 87
             if (message.contains("&&")) {
88 88
                 String[] split = message.split("&&");