注入bean失败异常
来源:7-16 配置SpringBoot支持WebSocket

慕九州9009739
2022-12-08
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘serverEndpointExporter’ defined in class path resource [com/example/emos/api/config/WebSocketConfig.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available
写回答
2回答
-
djkstra
2025-02-20
引入websocket后,springboot启动正常,但是再打包package时,异常。将TEST目录下的
EmosApiLearning20250205ApplicationTests { //@Test //void contextLoads() { //} } 注释掉,打包正常。
00 -
神思者
2022-12-08
你检查一下注解写了没,还有其他的WebSocket配置信息写的对不对
00
相似问题