问题一:
在springmvc中集成websocket时因为是使用外置tomcat,基本上没有太多的问题,但是在springboot中,因为springboot内置了tomcat,会导致websocket连接异常,直接出现404.
解决办法有两个:
1:使用外置tomcat。舍弃springboot内置tomcat
修改pom.xml中的
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
改为
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<