1.12. HTTP/2

    预计阅读时间: 2 分钟

    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.
    Servlet 4 容器需要支持 HTTP/2,Spring 框架 5 与 Servlet API 4 兼容。从编程模型的角度来看,应用程序无需做任何特别的事情。然而,与服务器配置相关的考虑因素是存在的。
    For more details, see the HTTP/2 wiki page.
    有关更多详细信息,请参阅 HTTP/2 维基页面。

    The Servlet API does expose one construct related to HTTP/2. You can use the javax.servlet.http.PushBuilder to proactively push resources to clients, and it is supported as a method argument to @RequestMapping methods.
    Servlet API 确实暴露了一个与 HTTP/2 相关的构造。您可以使用 javax.servlet.http.PushBuilder 来主动向客户端推送资源,并且它作为方法参数被 @RequestMapping 方法支持。