javax.websocket.server.ServerContainer not available 报错
- 经验分享
- 时间:2023-02-26 12:34
- 2953人已阅读
简介
因为这个错误我花费了一下午的时间,就是为了在springboot中集成websocket太难的网上大多数的回答都是测试时报错,我是启动时报错,废话不说了,直接进入主题环境情况springboot:2.2.13acitiviti6websocket2.报错信息从报错信息中无法获取到什么有用的信息,我就知道这个ServerEndpointExporter是有问题的其他的我也不知道解决方法:修改mave
🔔🔔好消息!好消息!🔔🔔
有需要的朋友👉:微信号
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency>
自此启动成功 真狗血
网上解决此问题的思路
1.因为是springbootTest的问题 需要增加注释 自己百度把
2.包冲突导致的(本文也算是)
3.说是tomcat 和web容器之间的问题 (本文也算是吧)
问题解决 开心