Closed vlaguduva closed 4 years ago
spring-boot-starter-web
brings in Spring MVC support - could you try to add spring-boot-starter-tomcat
instead and report back here?
spring-boot-starter-tomcat brings the reactive websocket up but the presence of spring-web bothers it, is there a reason why? can't a spring mvc project have reactive web sockets?
spring-boot-starter-web
brings both Spring MVC (the Servlet based web framework) and the Tomcat starter.
Whenever you choose to bring both spring-boot-starter-web
and spring-boot-starter-webflux
, Spring Boot auto-configures a Servlet-based application. Why? Because the common use case for that is to introduce the WebClient
(from WebFlux) in a Spring MVC application. This is covered in the reference documentation.
Thanks!
Spring Reactive WebSocket does not work when Spring Web is present in the classpath. For example, pull this sample application https://github.com/faros/reactive-websockets; this sample works on Netty but when I tried to bring this on Tomcat by including spring-boot-starter-web in the pom.xml, the ws:// url started to return 404.
Steps to reproduce:
Please note that I tried Tomcat update strategy unsuccessfully.