Spring Boot中使用Test单元测试报错javax.websocket.server.ServerContainer not available

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39036844/article/details/84285365

测试mybatis注解增删改查的时候,单元测试的时候,webSocket报错。只需要在测试类增加注解

@SpringBootTest(classes = {Application.class},webEnvironment =SpringBootTest.WebEnvironment.RANDOM_PORT)

暂时不知道为什么这样就行了。有大神看见麻烦解下疑惑。

猜你喜欢

转载自blog.csdn.net/qq_39036844/article/details/84285365
今日推荐