(java)websocket服务的两种实现方式

用java注解来监听连接@ServerEndpoint、连接成功@OnOpen、连接失败@OnClose、收到消息等状态@OnMessage。把spring中的ServerEndpointExporter对象注入进来。...