首先上报错信息:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverEndpointExporter' defined in class path resource [com/pky/testmybatis/config/WebSocketConfig.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available
出现这个问题首先排除掉springboot版本问题,本人使用spring boot 1.5和2.X都亲测过!
主要的问题就是在项目中的测试类,解决:直接注释掉测试类所有代码问题解决,maven install成功!