Skip to content

Commit c213724

Browse files
committed
Document Servlet PushBuilder API deprecation
See gh-33918
1 parent b6e6b01 commit c213724

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

framework-docs/modules/ROOT/pages/web/webmvc/mvc-controller/ann-methods/arguments.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ and others) and is equivalent to `required=false`.
3030

3131
| `jakarta.servlet.http.PushBuilder`
3232
| Servlet 4.0 push builder API for programmatic HTTP/2 resource pushes.
33-
Note that, per the Servlet specification, the injected `PushBuilder` instance can be null if the client
34-
does not support that HTTP/2 feature.
33+
Note that this API has been deprecated as of Servlet 6.1.
3534

3635
| `java.security.Principal`
3736
| Currently authenticated user -- possibly a specific `Principal` implementation class if known.

framework-docs/modules/ROOT/pages/web/webmvc/mvc-http2.adoc

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44

55
[.small]#xref:web/webflux/http2.adoc[See equivalent in the Reactive stack]#
66

7-
Servlet 4 containers are required to support HTTP/2, and Spring Framework 5 is compatible
8-
with Servlet API 4. From a programming model perspective, there is nothing specific that
7+
Servlet 4 containers are required to support HTTP/2, and Spring Framework requires
8+
Servlet API 6.1. From a programming model perspective, there is nothing specific that
99
applications need to do. However, there are considerations related to server configuration.
1010
For more details, see the
1111
{spring-framework-wiki}/HTTP-2-support[HTTP/2 wiki page].
12-
13-
The Servlet API does expose one construct related to HTTP/2. You can use the
14-
`jakarta.servlet.http.PushBuilder` to proactively push resources to clients, and it
15-
is supported as a xref:web/webmvc/mvc-controller/ann-methods/arguments.adoc[method argument] to `@RequestMapping` methods.

spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolverTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class ServletRequestMethodArgumentResolverTests {
6969

7070

7171
@BeforeEach
72+
@SuppressWarnings("deprecation")
7273
void setup() throws Exception {
7374
resolver = new ServletRequestMethodArgumentResolver();
7475
mavContainer = new ModelAndViewContainer();
@@ -241,6 +242,7 @@ void httpMethod() throws Exception {
241242
}
242243

243244
@Test
245+
@SuppressWarnings("deprecation")
244246
void pushBuilder() throws Exception {
245247
final PushBuilder pushBuilder = mock();
246248
servletRequest = new MockHttpServletRequest("GET", "") {
@@ -259,7 +261,7 @@ public PushBuilder newPushBuilder() {
259261
}
260262

261263

262-
@SuppressWarnings("unused")
264+
@SuppressWarnings({"unused", "deprecation"})
263265
public void supportedParams(ServletRequest p0,
264266
MultipartRequest p1,
265267
HttpSession p2,

0 commit comments

Comments
 (0)