HTTP/2
Servlet 4 容器需要支持 HTTP/2,而 Spring Framework 5 与 Servlet API 4 兼容。从编程模型的角度来看,应用程序无需执行任何特定操作。但是,存在与服务器配置相关的考虑因素。详细了解请参阅 HTTP/2 wiki 页面。
Servlet 4 containers are required to support HTTP/2, and Spring Framework 5 is compatible with Servlet API 4. From a programming model perspective, there is nothing specific that applications need to do. However, there are considerations related to server configuration. For more details, see the HTTP/2 wiki page.
Servlet API 公开了与 HTTP/2 相关的一个结构。你可以使用 jakarta.servlet.http.PushBuilder
主动将资源推送到客户端,它支持作为 method argument 到 @RequestMapping
的方法。
The Servlet API does expose one construct related to HTTP/2. You can use the
jakarta.servlet.http.PushBuilder
to proactively push resources to clients, and it
is supported as a method argument to @RequestMapping
methods.