Are you running in a Servlet container that supports JSR-356?
springboot集成websocket
springboot项目添加spring-boot-starter-websocket依赖后,一直报错Are you running in a Servlet container that supports JSR-356?
猜测是tomcat的问题!
移除tomcat
先检查是否引入tomcat依赖,我这边目前只有websocket包含了tomact,所以排除掉
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
<version>1.3.5.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>