websocket建立雙向聊天在關閉時調用service中的方法報錯,求解?@OnClose
public?void?onClose(@PathParam("fangJianId")?String?fangJianId,
@PathParam("uname")?String?uname)?throws?IOException?{
if?(!fqqServiseImpl.deleteFangjian(fangJianId,?uname))?{
this.session.getBasicRemote().sendText("關閉異常");
}
userSocket.get(fangJianId).remove(this);
if?(userSocket.get(fangJianId).size()?==?0)?{
userSocket.remove(fangJianId);
}
System.out.println(uname?+?"退出房間!!");
}
報錯:Failed to call onClose method of POJO end point for POJO of type [util.WebSocketPlay]
Sxy97
2017-10-18 10:06:48