在springboot的项目中如果使用了websocketxxx的配置类,那么在测试的时候必须加上
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)这样就可以正常启动测试了。
具体的可以查看官网
在springboot的项目中如果使用了websocketxxx的配置类,那么在测试的时候必须加上
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)这样就可以正常启动测试了。
具体的可以查看官网