WebSockets
Spring Boot 为嵌入式 Tomcat 和 Jetty 提供 WebSockets 自动配置。 如果你将战争文件部署到独立容器,Spring Boot 会假设该容器负责其 WebSocket 支持的配置。
Spring Framework 为 MVC Web 应用提供了丰富的 WebSocket 支持,可以通过以下内容轻松访问Spring Boot启动网页接口模块。
WebSocket 支持也适用于响应式网页应用,并且需要同时包含 WebSocket APISpring BootStarters网流:
<dependency>
<groupId>jakarta.websocket</groupId>
<artifactId>jakarta.websocket-api</artifactId>
</dependency>