ocr识别-websocket修改

This commit is contained in:
liyawei
2022-03-15 10:27:45 +08:00
parent 750639f9e2
commit 2f2008c290
2 changed files with 3 additions and 18 deletions
@@ -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();
}
}
@@ -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;
}
}