一、springboot 集成 WebSocket.
1. 集成 转载 https://blog.csdn.net/moshowgame/article/details/80275084
二、异常.
1. 异常信息:Caused by: javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to the same path [/ws/server] : existing endpoint was [class com.xxx.xx.index.utils.WebSocketServer.
2. 异常分析:在springboot中添加了websocket功能在内置的tomcat中可以启动该功能,但是打包成war包之后在外部tomcat中启动就报如下的错误。
3. 异常处理:外部tomcat注释以下代码就可以了,@SpringBootApplication启动时需要下面这段代码。