zoukankan      html  css  js  c++  java
  • javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to the same path [/websocket/{sid}] : existing endpoint was class com.sanyi.qibaobusiness.framework.webSocket.WebSocketServe

    报错:

    javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to the same path [/websocket/{sid}] : existing endpoint was class com.sanyi.qibaobusiness.framework.webSocket.WebSocketServer and new endpoint is class com.sanyi.qibaobusiness.framework.webSocket.WebSocketServer

    原因tomcat集成websocket不需要自己集成WebSocketConfig

    删除项目中的 WebSocketConfig

    下面的代码是原来集成的,注释掉就好了。

    @Configuration
    public class WebSocketConfig {
        @Bean
        public ServerEndpointExporter serverEndpointExporter() {
            return new ServerEndpointExporter();
        }
    }

    答案在:https://stackoverflow.com/questions/31178799/websocket-issue-multiple-endpoints-may-not-be-deployed-to-the-same-path

  • 相关阅读:
    纹理加载和异步
    地板上创建批量小方块
    创建自定义几何体(以立方体为例)
    WTForms
    angular和vue的差别
    vuejs简单介绍特点
    angularjs简单介绍和特点
    flask重要点
    redis
    DRF之认证组件源码解析
  • 原文地址:https://www.cnblogs.com/zeussbook/p/10792351.html
Copyright © 2011-2022 走看看