Commit 2041eaa7 authored by qizhiqiang's avatar qizhiqiang

称重小程序开发修改war包名称

parent ece83525
......@@ -48,6 +48,7 @@
</dependencies>
<build>
<finalName>metage</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
......
......@@ -138,7 +138,7 @@ public class RxtxUtils extends Thread implements SerialPortEventListener {
// 如果堵塞队列中存在数据就将其输出
if (msgQueue.size() > 0) {
weightings = Double.parseDouble(msgQueue.take());
System.out.println(weightings);
System.out.println("接收到的消息:"+weightings);
WebSocket webSocket = new WebSocket();
webSocket.sendAllToUserMessage(String.valueOf(weightings));
// sendDate(weightings);
......
......@@ -31,6 +31,7 @@ public class WebSocket {
for (WebSocket item:
webSocketSet) {
item.session.getBasicRemote().sendText(message);
System.out.println("服务端发送的消息:"+message);
}
}
}catch (Exception e){
......@@ -42,6 +43,7 @@ public class WebSocket {
@OnClose
public void onClose(Session session){
webSocketSet.remove(this);
System.out.println("建立连接:"+webSocketSet.size());
}
//接收前端发送的消息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment