@serverendpoint路径在哪里映射(Websockets)

对于我使用spring框架的websocket,我有以下@serverendpoint路径:

@ServerEndpoint(value="/serverendpoint", configurator = SpringConfigurator.class) 
  1. 我的第一个问题是说我有一个urlwww.example.com 。 具有路径serverendpoint的serverendpoint在哪里被映射? 我可以在wss://example.com:$PORT/currentpage.html/serverendpoint访问我的serverendpoint wss://example.com:$PORT/currentpage.html/serverendpoint ? 或者这是错误的方式。
  2. 我有一台Wildfly 10服务器在运行。 基于另一个SO问题 ,我被告知要使用以下Uri: var wsUri = "wss://" + document.location.hostname + ":8443" + document.location.pathname + "/../serverendpoint"; 。 但是,当我这样做时,在谷歌浏览器中,我收到以下错误:

WebSocket is already in CLOSING or CLOSED state.

我的console.log打印出websocket已连接,但后来我立即得到了上述错误。 我究竟做错了什么?

根据Wildfly服务器日志,我知道serverendpoint被映射:

 [io.undertow.websockets.jsr] (ServerService Thread Pool -- 78) UT026003: Adding annotated server endpoint class com.voice2.spring.web.controller.serverendpoint for path /serverendpoint 

那么如何连接到此服务器端点?

这是我的项目文件层次结构:

在此处输入图像描述