【已解决】项目中使用websocket的时候,使用Junit自测其他diam提示:webSocket初始化失败怎么办?
【已解决】项目中使用websocket的时候,使用Junit自测其他diam提示:webSocket初始化失败错误信息如下图:解决方案:
【已解决】项目中使用websocket的时候,使用Junit自测其他diam提示:webSocket初始化失败
错误信息如下图:
现场复现:
我使用spring boot 和 junit测试。测试类如下:
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = {BaseBuildApplication.class})
public class ScoreProjectDictServerImplTest {
@Resource
private IScoreProjectDictServer scoreProjectDictServer;
@Test
public void selectAllTest(){
System.out.println("1:"+scoreProjectDictServer.getById(1));
}
}错误信息: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverEndpointExporter' defined in class path resource [com/hdtd/safequality/business/login/config/WebSocketConfig.class]: Invocation of init method failed; nested exception is java
原创不易,完成人机校验,阅读全文
相关推荐
网络文章IOC容器初始化过程AI编程Trae中使用spring boot启动失败处理AI相关在使用ollama pull的时候错误提示:Error: Head "http://*:11434/": dial tcp: lookup *: no such host 怎么办?工作小总结mybatis批量update的时候失败,解决办法SPRING CLOUD【以解决】项目使用feign时候提示bean不能注入feignDOCKER在docker中使用iptables命令时候,提示需要root用户工作小总结&小工具类记录在Spring boot项目中使用@Async注解,但是没有生效的排查。工作小总结【已解决】使用jasypt的jar对文本加密的时候,提示java.security.NoSuchAlgorithmException错误怎么解决