我跟着this tutorial构建了一个spring websocket应用程序。我保留了每个文件,但我既不使用maven也不使用gradle。我在tomcat服务器上运行index.html文件。当我点击连接时,我得到:
打开网络插座...获取http://localhost:8080/hello/info 404(不是 发现)哎呀!丢失与未定义的连接
在我的Chrome开发者窗口中。 为什么会这样?
答案 0 :(得分:0)
link可能有所帮助。在这里,我给出了完整的例子。
为此你需要在你的客户端使用stomp.js,sockjs 和弹簧 - websocket& spring-messaging 4.2.6.RELEASE jar在服务器端,