请问各位大佬,springboot采用外部的tomcat如何集成websocket?为什么的连接websocket端点总是失败?

解决方案 »

  1.   

    tomcat的版本既然用了springboot就没必要用tomcat 调整版本冲突很麻烦
      

  2.   

    意思是没必要用外部的tomcat吗?但是内置的tomcat性能肯定比外部的性能差啊
      

  3.   

    springboot内置tomcat正常使用,单用外置tomcat。有哪个类或者方法是需要注释得。比如:
    //@Configuration
    //public class WebSocketConfig {
    //
    // @Bean
    //    public ServerEndpointExporter serverEndpointExporter() {
    //        return new ServerEndpointExporter();
    //    }
    //}另外还得注意 端口号是通得啊,可以访问