Update docs on HTTP/2
This commit is contained in:
@@ -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]#<<web.adoc#mvc-http2,Same in Spring MVC>>#
|
||||
|
||||
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.
|
||||
@@ -20,7 +20,9 @@ https://github.com/spring-projects/spring-framework/tree/master/spring-webflux[s
|
||||
This section covers Spring Web MVC. The <<web-reactive.adoc#spring-web-reactive,next section>>
|
||||
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
|
||||
== HTTP/2
|
||||
[.small]#<<web-reactive.adoc#webflux-http2,Same in Spring WebFlux>>#
|
||||
|
||||
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].
|
||||
|
||||
[[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-ann-arguments>>.
|
||||
|
||||
[[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].
|
||||
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 <<mvc-ann-arguments,method argument>> to `@RequestMapping` methods.
|
||||
|
||||
Reference in New Issue
Block a user