From 44a78bc47ab66d6492bc0579f58f24dc1921b5d5 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 03 四月 2025 15:44:30 +0800 Subject: [PATCH] 1、webSocket相关代码进行了注解优化; 2、通信中间件把阀控器上报的阀门状态进行消息推送,前端、小程序可能用到(webSocket推送)。 --- pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java index 79375db..2a405c4 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/Server.java @@ -3,6 +3,7 @@ import java.util.ArrayList; import java.util.List; +import com.dy.common.util.ConfigProperties; import com.dy.rtuMw.server.*; import com.dy.rtuMw.server.msCenter.MsCenterConfigVo; import com.dy.rtuMw.server.msCenter.MsCenterUnit; @@ -42,6 +43,7 @@ private Document doc = null ; private boolean showStartInfo = false ; + private String orgTag ; private String RmiSvUrl ; private String TcpSvUrl ; @Value("${server.port}") @@ -85,7 +87,7 @@ boolean running = false ; long start = System.currentTimeMillis() ; try { - //ConfigProperties.init(this.getClass().getResourceAsStream("/config/config.properties"), false); + ConfigProperties.init(this.getClass().getResourceAsStream("/config.properties"), false); this.conf = new ConfigXml4Springboot() ; this.doc = this.conf.createDom(this.resourceLoader, "config.xml") ; @@ -115,7 +117,7 @@ System.out.println("@@@@@@@@@@@@@@@@@@@@@# #@@@@@@@@@@@@@@@@O") ; System.out.println("@@@@@@@@@@@@@@@@@@@@@@@ &@@@@@@@@@@@@@@") ; System.out.println("@@@@@@$ $@@@@@@@@@& O@@@@@@@@@@@#") ; - System.out.println("@@@@@@$ @@@@@@@@@ @@@@@@@@@& " + svName + "RtuMw 1.0.00" ) ; + System.out.println("@@@@@@$ @@@@@@@@@ @@@@@@@@@& " + this.orgTag + svName + "RtuMw 1.0.00" ) ; if(this.HttpSvPath != null && this.HttpSvPort != null){ System.out.println("@@@@@@$ O@@@@@@@@@ &@@@@@@@@ HttpSv [ip]:" + this.HttpSvPort + this.HttpSvPath) ; }else{ @@ -132,7 +134,7 @@ }else{ System.out.println("@@@@@@$ #@@@@@@@@@$ &@@@@@@@@" ) ; } - System.out.println("@@@@@@@@@@@@@@@@@@@@@@# &@@@@@@@@ Runing in standalone mode" ) ; + System.out.println("@@@@@@@@@@@@@@@@@@@@@@# &@@@@@@@@ Running in standalone mode" ) ; System.out.println("@@@@@@@@@@@@@@@@@@@@@& &@@@@@@@@ Startup in " + (System.currentTimeMillis() - start) + " MS" ) ; System.out.println("@@@@@@@@@@@@@@@@@@@# &@@@@@@@@ " + company) ; System.out.println("@@@@@@@@@@@@@@@@#O &@@@@@@@@") ; @@ -149,9 +151,10 @@ /////////////// //鍩烘湰閰嶇疆 ServerProperties.orgTag = this.conf.getSetAttrTxt(this.doc, "config.base", "orgTag", null, false, null) ; - if(ServerProperties.orgTag==null || ServerProperties.orgTag.trim().equals("")){ + if(ServerProperties.orgTag == null || ServerProperties.orgTag.trim().equals("")){ throw new Exception("鏈烘瀯tag涓嶈兘涓虹┖") ; } + this.orgTag = ServerProperties.orgTag ; ServerProperties.isLowPower = conf.getSetAttrBoolean(doc, "config.base", "isLowPower", null, null) ; if(ServerProperties.isLowPower == null){ ServerProperties.isLowPower = false ; -- Gitblit v1.8.0