Commit dd2a0fe0 sunke

WebSocket

1 个父辈 ea5628f1
......@@ -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>
......
......@@ -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 {
......
......@@ -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
......
......@@ -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!