2017-05-06 21 views
0

the error stackTomcat的說:在[的onMessage]方法

我的註釋在ServerEndPoint沒有有效載荷參數: @ServerEndpoint(value = "/portal/{action}/{num}/{msg}", configurator = GetHttpSessionConfigurator.class)

我的註釋在onMessage方法:

@OnMessage 
public void onMessage(@PathParam("action") String action, @PathParam("num") String num, @PathParam("msg") String msg, Session session) 

回答

0

我知道。有必要添加一個參數來接收其他消息。因此,只需刪除由@OnMethod註釋的[Method]參數的第三個註釋。