diff --git a/src/docs/asciidoc/web/webflux.adoc b/src/docs/asciidoc/web/webflux.adoc index 2d1baadce4..e18ee74dd5 100644 --- a/src/docs/asciidoc/web/webflux.adoc +++ b/src/docs/asciidoc/web/webflux.adoc @@ -1446,3 +1446,19 @@ For advanced mode, remove `@EnableWebFlux` and extend directly from You can keep existing methods in `WebConfig` but you can now also override bean declarations from the base class and you can still have any number of other ``WebMvcConfigurer``'s on the classpath. + + + + +[[webflux-http2]] +== HTTP/2 +[.small]#<># + +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 please check out the +https://github.com/spring-projects/spring-framework/wiki/HTTP-2-support[HTTP/2 wiki page]. + +Currently Spring WebFlux does not support HTTP/2 with Netty. There is also no support for +pushing resources programmatically to the client. \ No newline at end of file diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc index ee75741bf5..5415774f41 100644 --- a/src/docs/asciidoc/web/webmvc.adoc +++ b/src/docs/asciidoc/web/webmvc.adoc @@ -20,7 +20,9 @@ https://github.com/spring-projects/spring-framework/tree/master/spring-webflux[s This section covers Spring Web MVC. The <> covers Spring WebFlux. - +For baseline information and compatibility with Servlet container and Java EE version +ranges please visit the Spring Framework +https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Versions[Wiki]. [[mvc-servlet]] @@ -1555,6 +1557,8 @@ requests are allowed to access a session concurrently. |`javax.servlet.http.PushBuilder` |Servlet 4.0 push builder API for programmatic HTTP/2 resource pushes. + Note that per Servlet spec, the injected `PushBuilder` instance can be null if the client + does not support that HTTP/2 feature. |`java.security.Principal` |Currently authenticated user; possibly a specific `Principal` implementation class if known. @@ -4808,23 +4812,15 @@ include::webmvc-view.adoc[leveloffset=+1] [[mvc-http2]] -== HTTP/2 support - - -[[mvc-http2-servlet4]] -=== Servlet 4 support - -Spring MVC supports the Servlet 4 API; of course, the chosen Servlet container must support -that API in the first place. - -It is now possible to inject a `javax.servlet.http.PushBuilder` -as a Controller method argument for pushing HTTP/2 resources programmatically. -Note that per Servlet spec, the injected `PushBuilder` instance can be null if the client -does not support that HTTP/2 feature. See <>. - -[[mvc-http2-container]] -=== Container configuration - -For more information on how to configure your Servlet container for HTTP/2, please check -out the https://github.com/spring-projects/spring-framework/wiki/HTTP-2-support[dedicated -wiki page on HTTP/2 support]. \ No newline at end of file +== HTTP/2 +[.small]#<># + +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 please check out the +https://github.com/spring-projects/spring-framework/wiki/HTTP-2-support[HTTP/2 wiki page]. + +The Servlet API does expose one construct related to HTTP/2. The +`javax.servlet.http.PushBuilder` can used to proactively push resources to clients and it +is supported as a <> to `@RequestMapping` methods.