javax.websocket.server.ServerContainer not available

solution:

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RunWith(SpringRunner.class)

 说明(转):

经查阅资料,得知SpringBootTest在启动的时候不会启动服务器,所以WebSocket自然会报错,这个时候需要添加选项webEnvironment,以便提供一个测试的web环境。

SpringBoot使用war包发布,javax.websocket.server.ServerContainer not available报错问题

javax.websocket.server.ServerContainer not available

原文地址:https://www.cnblogs.com/foolash/p/13853821.html