Springboot webscoket打包war问题

105 阅读1分钟

1.无法打包,test报错情况,在pox.xml文件plugins里面添加。

  <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
            <skip>true</skip>
        </configuration>
    </plugin>            

2.war部署到外部tomcat不需要webscoket配置文件,注释掉配置文件以下代码:

@Bean
public ServerEndpointExporter serverEndpointExporter() {
    return new ServerEndpointExporter();
}