- 
                Notifications
    You must be signed in to change notification settings 
- Fork 41.6k
Description
I was trying to piece together a simple chat sample using Spring Boot, WebFlux and WebSockets. However that isn't as straight forward (initially) as one might think.
Including spring-boot-starter-websocket brings in spring-boot-starter-web and suddenly bootstraps Tomcat instead of Netty and rigs up Spring MVC. Adding exclusions won't be of much help either unless you do very detailed exclusions (excluding spring-boot-starter-web will exclude too much again).
I made it work by just including javax.websocket-api (version 1.1) as a dependency (maybe this needs to be added to the spring-boot-dependencies as a managed dependency?).
For testing I include some WebSocket client library so I could write an integration test. However it took me  a while to figure out that spring-boot-starter-websocket is meant for the classic Servlet based approach and not the reactive approach.
It might be worthwhile to include this in the WebSockets section of the Spring Boot documentation or split that into 2 sections for a Servlet and Reactive approach.
Added bonus would be to have a sample web socket / reactive included in the spring boot samples.