Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit dd2a0fe0
由
sunke
编写于
2021-08-13 14:10:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
WebSocket
1 个父辈
ea5628f1
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
6 行增加
和
3 行删除
pom.xml
src/main/java/com/neotel/smfcore/core/system/websocket/WebSocketConfig.java
src/main/java/com/neotel/smfcore/core/system/websocket/WebSocketServer.java
src/main/java/com/neotel/smfcore/hella/handler/HellaServiceHandler.java
pom.xml
查看文件 @
dd2a0fe
...
...
@@ -10,7 +10,7 @@
</parent>
<groupId>
com.neotel
</groupId>
<artifactId>
smf-core
</artifactId>
<version>
1.
7.1
</version>
<version>
1.
8.1312
</version>
<packaging>
war
</packaging>
<name>
smf-core
</name>
<description>
SMF project for Spring Boot
</description>
...
...
src/main/java/com/neotel/smfcore/core/system/websocket/WebSocketConfig.java
查看文件 @
dd2a0fe
...
...
@@ -15,11 +15,12 @@
*/
package
com
.
neotel
.
smfcore
.
core
.
system
.
websocket
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.socket.server.standard.ServerEndpointExporter
;
@ConditionalOnProperty
(
name
=
"spring.profiles.active"
,
havingValue
=
"dev"
)
@Configuration
public
class
WebSocketConfig
{
...
...
src/main/java/com/neotel/smfcore/core/system/websocket/WebSocketServer.java
查看文件 @
dd2a0fe
...
...
@@ -17,6 +17,7 @@ package com.neotel.smfcore.core.system.websocket;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.stereotype.Component
;
import
javax.websocket.*
;
...
...
@@ -30,6 +31,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
/**
* WebSocket与客户端通信
*/
@ConditionalOnClass
(
value
=
WebSocketConfig
.
class
)
@ServerEndpoint
(
"/webSocket/{sid}"
)
@Slf4j
@Component
...
...
src/main/java/com/neotel/smfcore/hella/handler/HellaServiceHandler.java
查看文件 @
dd2a0fe
...
...
@@ -104,7 +104,7 @@ public class HellaServiceHandler extends IoHandlerAdapter implements ITaskListen
commandMap
.
put
(
command
.
getEventId
(),
command
);
log
.
info
(
"发送检查物料条码请求:"
+
command
.
toReqMsg
());
ResultBean
resultBean
=
HellaTcpClient
.
sendMsg
(
command
.
toReqMsg
());
testCheckOK
(
command
);
//
testCheckOK(command);
resultBean
.
setMsg
(
"Check Material result:"
+
resultBean
.
getMsg
());
return
resultBean
;
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论