Skip to content

Commit 845110a

Browse files
committed
Update docs on HTTP/2
1 parent fb76aa0 commit 845110a

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed

src/docs/asciidoc/web/webflux.adoc

+16
Original file line numberDiff line numberDiff line change
@@ -1446,3 +1446,19 @@ For advanced mode, remove `@EnableWebFlux` and extend directly from
14461446
You can keep existing methods in `WebConfig` but you can now also override bean declarations
14471447
from the base class and you can still have any number of other ``WebMvcConfigurer``'s on
14481448
the classpath.
1449+
1450+
1451+
1452+
1453+
[[webflux-http2]]
1454+
== HTTP/2
1455+
[.small]#<<web.adoc#mvc-http2,Same in Spring MVC>>#
1456+
1457+
Servlet 4 containers are required to support HTTP/2 and Spring Framework 5 is compatible
1458+
with Servlet API 4. From a programming model perspective there is nothing specific that
1459+
applications need to do. However there are considerations related to server configuration.
1460+
For more details please check out the
1461+
https://github.com/spring-projects/spring-framework/wiki/HTTP-2-support[HTTP/2 wiki page].
1462+
1463+
Currently Spring WebFlux does not support HTTP/2 with Netty. There is also no support for
1464+
pushing resources programmatically to the client.

src/docs/asciidoc/web/webmvc.adoc

+17-21
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ https://github.com/spring-projects/spring-framework/tree/master/spring-webflux[s
2020
This section covers Spring Web MVC. The <<web-reactive.adoc#spring-web-reactive,next section>>
2121
covers Spring WebFlux.
2222

23-
23+
For baseline information and compatibility with Servlet container and Java EE version
24+
ranges please visit the Spring Framework
25+
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Versions[Wiki].
2426

2527

2628
[[mvc-servlet]]
@@ -1555,6 +1557,8 @@ requests are allowed to access a session concurrently.
15551557

15561558
|`javax.servlet.http.PushBuilder`
15571559
|Servlet 4.0 push builder API for programmatic HTTP/2 resource pushes.
1560+
Note that per Servlet spec, the injected `PushBuilder` instance can be null if the client
1561+
does not support that HTTP/2 feature.
15581562

15591563
|`java.security.Principal`
15601564
|Currently authenticated user; possibly a specific `Principal` implementation class if known.
@@ -4808,23 +4812,15 @@ include::webmvc-view.adoc[leveloffset=+1]
48084812

48094813

48104814
[[mvc-http2]]
4811-
== HTTP/2 support
4812-
4813-
4814-
[[mvc-http2-servlet4]]
4815-
=== Servlet 4 support
4816-
4817-
Spring MVC supports the Servlet 4 API; of course, the chosen Servlet container must support
4818-
that API in the first place.
4819-
4820-
It is now possible to inject a `javax.servlet.http.PushBuilder`
4821-
as a Controller method argument for pushing HTTP/2 resources programmatically.
4822-
Note that per Servlet spec, the injected `PushBuilder` instance can be null if the client
4823-
does not support that HTTP/2 feature. See <<mvc-ann-arguments>>.
4824-
4825-
[[mvc-http2-container]]
4826-
=== Container configuration
4827-
4828-
For more information on how to configure your Servlet container for HTTP/2, please check
4829-
out the https://github.com/spring-projects/spring-framework/wiki/HTTP-2-support[dedicated
4830-
wiki page on HTTP/2 support].
4815+
== HTTP/2
4816+
[.small]#<<web-reactive.adoc#webflux-http2,Same in Spring WebFlux>>#
4817+
4818+
Servlet 4 containers are required to support HTTP/2 and Spring Framework 5 is compatible
4819+
with Servlet API 4. From a programming model perspective there is nothing specific that
4820+
applications need to do. However there are considerations related to server configuration.
4821+
For more details please check out the
4822+
https://github.com/spring-projects/spring-framework/wiki/HTTP-2-support[HTTP/2 wiki page].
4823+
4824+
The Servlet API does expose one construct related to HTTP/2. The
4825+
`javax.servlet.http.PushBuilder` can used to proactively push resources to clients and it
4826+
is supported as a <<mvc-ann-arguments,method argument>> to `@RequestMapping` methods.

0 commit comments

Comments
 (0)