ocr识别-websocket修改
This commit is contained in:
-15
@@ -1,15 +0,0 @@
|
||||
package com.jero.modules.websocket.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
//@Configuration
|
||||
public class WebSocketConfig {
|
||||
|
||||
// @Bean
|
||||
public ServerEndpointExporter serverEndpointExporter() {
|
||||
return new ServerEndpointExporter();
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -27,8 +27,8 @@ public class WebsocketServerImpl implements WebSocketServer {
|
||||
this.session = session;
|
||||
webSocketSet.add(this); //加入set中
|
||||
session.getBasicRemote().sendText("连接已建立");
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class WebsocketServerImpl implements WebSocketServer {
|
||||
try {
|
||||
item.session.getBasicRemote().sendText("1");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user