Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 spring 框架和 spring websocket 4.0.6。
我正在使用 web-socket,我需要找到从服务器关闭它们的方法。
有办法吗?
一旦你得到一个用户会话的引用(如果你使用的是 sockjs,可能是一个 SockJSSession),你可以手动关闭会话:
session.close();
请参阅javadoc 以供参考