Skip to content

Commit fce7b3d

Browse files
committed
Remove Undertow-specific support and testing
Undertow does not support Servlet 6.1, we need to remove compatibility tests as well as Undertow-specific classes for WebSocket and reactive support. Closes gh-35354
1 parent 887ef75 commit fce7b3d

File tree

45 files changed

+28
-2512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+28
-2512
lines changed

framework-docs/modules/ROOT/pages/core/databuffer-codec.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
Java NIO provides `ByteBuffer` but many libraries build their own byte buffer API on top,
55
especially for network operations where reusing buffers and/or using direct buffers is
6-
beneficial for performance. For example Netty has the `ByteBuf` hierarchy, Undertow uses
7-
XNIO, Jetty uses pooled byte buffers with a callback to be released, and so on.
6+
beneficial for performance. For example Netty has the `ByteBuf` hierarchy,
7+
Jetty uses pooled byte buffers with a callback to be released, and so on.
88
The `spring-core` module provides a set of abstractions to work with various byte buffer
99
APIs as follows:
1010

framework-docs/modules/ROOT/pages/overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ As of Spring Framework 6.0, Spring has been upgraded to the Jakarta EE 9 level
7373
traditional `javax` packages. With EE 9 as the minimum and EE 10 supported already,
7474
Spring is prepared to provide out-of-the-box support for the further evolution of
7575
the Jakarta EE APIs. Spring Framework 6.0 is fully compatible with Tomcat 10.1,
76-
Jetty 11 and Undertow 2.3 as web servers, and also with Hibernate ORM 6.1.
76+
Jetty 11 as web servers, and also with Hibernate ORM 6.1.
7777

7878
Over time, the role of Java/Jakarta EE in application development has evolved. In the
7979
early days of J2EE and Spring, applications were created to be deployed to an application

framework-docs/modules/ROOT/pages/web-reactive.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
This part of the documentation covers support for reactive-stack web applications built
55
on a {reactive-streams-site}/[Reactive Streams] API to run on non-blocking servers,
6-
such as Netty, Undertow, and Servlet containers. Individual chapters cover
6+
such as Netty and Servlet containers. Individual chapters cover
77
the xref:web/webflux.adoc#webflux[Spring WebFlux] framework,
88
the reactive xref:web/webflux-webclient.adoc[`WebClient`],
99
support for xref:web/webflux-test.adoc[testing],

framework-docs/modules/ROOT/pages/web/webflux-websocket.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ subsequently use `DataBufferUtils.release(dataBuffer)` when the buffers are cons
367367
`WebSocketHandlerAdapter` delegates to a `WebSocketService`. By default, that is an instance
368368
of `HandshakeWebSocketService`, which performs basic checks on the WebSocket request and
369369
then uses `RequestUpgradeStrategy` for the server in use. Currently, there is built-in
370-
support for Reactor Netty, Tomcat, Jetty, and Undertow.
370+
support for Reactor Netty, Tomcat, and Jetty.
371371

372372
`HandshakeWebSocketService` exposes a `sessionAttributePredicate` property that allows
373373
setting a `Predicate<String>` to extract attributes from the `WebSession` and insert them
@@ -446,7 +446,7 @@ specify CORS settings by URL pattern. If both are specified, they are combined b
446446
=== Client
447447

448448
Spring WebFlux provides a `WebSocketClient` abstraction with implementations for
449-
Reactor Netty, Tomcat, Jetty, Undertow, and standard Java (that is, JSR-356).
449+
Reactor Netty, Tomcat, Jetty, and standard Java (that is, JSR-356).
450450

451451
NOTE: The Tomcat client is effectively an extension of the standard Java one with some extra
452452
functionality in the `WebSocketSession` handling to take advantage of the Tomcat-specific

framework-docs/modules/ROOT/pages/web/webflux.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The original web framework included in the Spring Framework, Spring Web MVC, was
88
purpose-built for the Servlet API and Servlet containers. The reactive-stack web framework,
99
Spring WebFlux, was added later in version 5.0. It is fully non-blocking, supports
1010
{reactive-streams-site}/[Reactive Streams] back pressure, and runs on such servers as
11-
Netty, Undertow, and Servlet containers.
11+
Netty, and Servlet containers.
1212

1313
Both web frameworks mirror the names of their source modules
1414
({spring-framework-code}/spring-webmvc[spring-webmvc] and

framework-docs/modules/ROOT/pages/web/webflux/http2.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
[.small]#xref:web/webmvc/mvc-http2.adoc[See equivalent in the Servlet stack]#
66

7-
HTTP/2 is supported with Reactor Netty, Tomcat, Jetty, and Undertow. However, there are
7+
HTTP/2 is supported with Reactor Netty, Tomcat, and Jetty. However, there are
88
considerations related to server configuration. For more details, see the
99
{spring-framework-wiki}/HTTP-2-support[HTTP/2 wiki page].

framework-docs/modules/ROOT/pages/web/webflux/new-framework.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ You have maximum choice of libraries, since, historically, most are blocking.
127127

128128
* If you are already shopping for a non-blocking web stack, Spring WebFlux offers the same
129129
execution model benefits as others in this space and also provides a choice of servers
130-
(Netty, Tomcat, Jetty, Undertow, and Servlet containers), a choice of programming models
130+
(Netty, Tomcat, Jetty, and Servlet containers), a choice of programming models
131131
(annotated controllers and functional web endpoints), and a choice of reactive libraries
132132
(Reactor, RxJava, or other).
133133

@@ -165,7 +165,7 @@ unsure what benefits to look for, start by learning about how non-blocking I/O w
165165
== Servers
166166

167167
Spring WebFlux is supported on Tomcat, Jetty, Servlet containers, as well as on
168-
non-Servlet runtimes such as Netty and Undertow. All servers are adapted to a low-level,
168+
non-Servlet runtimes such as Netty. All servers are adapted to a low-level,
169169
xref:web/webflux/reactive-spring.adoc#webflux-httphandler[common API] so that higher-level
170170
xref:web/webflux/new-framework.adoc#webflux-programming-models[programming models] can be supported across servers.
171171

@@ -175,7 +175,7 @@ xref:web/webflux/dispatcher-handler.adoc#webflux-framework-config[WebFlux infras
175175
lines of code.
176176

177177
Spring Boot has a WebFlux starter that automates these steps. By default, the starter uses
178-
Netty, but it is easy to switch to Tomcat, Jetty, or Undertow by changing your
178+
Netty, but it is easy to switch to Tomcat, or Jetty by changing your
179179
Maven or Gradle dependencies. Spring Boot defaults to Netty, because it is more widely
180180
used in the asynchronous, non-blocking space and lets a client and a server share resources.
181181

@@ -188,8 +188,6 @@ adapter. It is not exposed for direct use.
188188
NOTE: It is strongly advised not to map Servlet filters or directly manipulate the Servlet API in the context of a WebFlux application.
189189
For the reasons listed above, mixing blocking I/O and non-blocking I/O in the same context will cause runtime issues.
190190

191-
For Undertow, Spring WebFlux uses Undertow APIs directly without the Servlet API.
192-
193191

194192
[[webflux-performance]]
195193
== Performance

framework-docs/modules/ROOT/pages/web/webflux/reactive-spring.adoc

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ applications:
77
* For server request processing there are two levels of support.
88
** xref:web/webflux/reactive-spring.adoc#webflux-httphandler[HttpHandler]: Basic contract for HTTP request handling with
99
non-blocking I/O and Reactive Streams back pressure, along with adapters for Reactor Netty,
10-
Undertow, Tomcat, Jetty, and any Servlet container.
10+
Tomcat, Jetty, and any Servlet container.
1111
** xref:web/webflux/reactive-spring.adoc#webflux-web-handler-api[`WebHandler` API]: Slightly higher level, general-purpose web API for
1212
request handling, on top of which concrete programming models such as annotated
1313
controllers and functional endpoints are built.
@@ -40,10 +40,6 @@ The following table describes the supported server APIs:
4040
| Netty API
4141
| {reactor-github-org}/reactor-netty[Reactor Netty]
4242

43-
| Undertow
44-
| Undertow API
45-
| spring-web: Undertow to Reactive Streams bridge
46-
4743
| Tomcat
4844
| Servlet non-blocking I/O; Tomcat API to read and write ByteBuffers vs byte[]
4945
| spring-web: Servlet non-blocking I/O to Reactive Streams bridge
@@ -67,10 +63,6 @@ The following table describes server dependencies (also see
6763
|io.projectreactor.netty
6864
|reactor-netty
6965

70-
|Undertow
71-
|io.undertow
72-
|undertow-core
73-
7466
|Tomcat
7567
|org.apache.tomcat.embed
7668
|tomcat-embed-core
@@ -104,30 +96,6 @@ Kotlin::
10496
----
10597
======
10698

107-
*Undertow*
108-
[tabs]
109-
======
110-
Java::
111-
+
112-
[source,java,indent=0,subs="verbatim,quotes"]
113-
----
114-
HttpHandler handler = ...
115-
UndertowHttpHandlerAdapter adapter = new UndertowHttpHandlerAdapter(handler);
116-
Undertow server = Undertow.builder().addHttpListener(port, host).setHandler(adapter).build();
117-
server.start();
118-
----
119-
120-
Kotlin::
121-
+
122-
[source,kotlin,indent=0,subs="verbatim,quotes"]
123-
----
124-
val handler: HttpHandler = ...
125-
val adapter = UndertowHttpHandlerAdapter(handler)
126-
val server = Undertow.builder().addHttpListener(port, host).setHandler(adapter).build()
127-
server.start()
128-
----
129-
======
130-
13199
*Tomcat*
132100
[tabs]
133101
======

framework-platform/framework-platform.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ dependencies {
5454
api("io.r2dbc:r2dbc-spi:1.0.0.RELEASE")
5555
api("io.reactivex.rxjava3:rxjava:3.1.10")
5656
api("io.smallrye.reactive:mutiny:1.10.0")
57-
api("io.undertow:undertow-core:2.3.18.Final")
58-
api("io.undertow:undertow-servlet:2.3.18.Final")
59-
api("io.undertow:undertow-websockets-jsr:2.3.18.Final")
6057
api("io.vavr:vavr:0.10.4")
6158
api("jakarta.activation:jakarta.activation-api:2.1.3")
6259
api("jakarta.annotation:jakarta.annotation-api:3.0.0")

spring-web/spring-web.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies {
2828
optional("io.netty:netty-transport")
2929
optional("io.projectreactor.netty:reactor-netty-http")
3030
optional("io.reactivex.rxjava3:rxjava")
31-
optional("io.undertow:undertow-core")
3231
optional("jakarta.el:jakarta.el-api")
3332
optional("jakarta.faces:jakarta.faces-api")
3433
optional("jakarta.json.bind:jakarta.json.bind-api")

0 commit comments

Comments
 (0)