-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Jetty 12 #36073
Comments
Jetty 12 has been released! 🎉 https://github.com/eclipse/jetty.project/releases/tag/jetty-12.0.0 |
Hi, Does the spring-boot-starter for Spring Boot 3 work now with Jetty 12 ? |
No, not yet. There are a significant number of breaking API changes in Jetty 12 to which Spring Boot will have to adapt. We hope to support Jetty 12 in Spring Boot 3.2 and Spring Framework 6.1.
Spring Boot 3 works with Jetty 11 but you have to downgrade the Servlet API to 5.0. #33044 contains various ways to do that with both Maven and Gradle. |
Is there an active branch with this effort where I can participate in? |
Thanks, @joakime. spring-projects/spring-framework#30698 is the next piece in the puzzle. I don't know if there's an active branch for that work. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
spring-projects/spring-framework#30698 should land in Framework this week, allowing us to tackle this in 3.2.x. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Motivation: Spring 6 HTTP client is split into two parts. #4838 (comment) It will be easier to review if Spring dependencies are upgraded before working on Spring HTTP 6 integration. Dependencies: - Spring 6.0.13 -> 6.1.2 - Spring Boot 2.7.16 -> 2.7.18, 3.1.4 -> 3.2.1 - Jetty 12.0.5 Modifications: - Spring Boot Actuator - `@AutoConfigureMetrics` has been removed in favor of `@AutoConfigureObservability`. spring-projects/spring-boot#31308 - `@EnableTestMetrics` is added in Spring Boot 2 and 3 modules to share the same test code. - `@EnableTestMetrics` in `boot2-actuator-autoconfigure` inherits `@AutoConfigureMetrics` but `@AutoConfigureObservability` is inherited in `boot3-actuator-autoconfigure`. - Spring Boot WebFlux - `AbstractServerHttpRequestVersionSpecific` is added to shim the API changes in Spring 6.1 - Some return types are wrapped in `Mono` in test REST APIs. Otherwise, the service method is invoked with a blocking executor of Spring WebFlux. spring-projects/spring-framework@b016f38#diff-8fd6b8e3408492ba1cabbbea613ac33b7c674db0a9287a2d479e83ec55c1544eR253-R254 - Jetty 12 - Jetty version has been upgraded to 12 in Spring Boot 3.2. spring-projects/spring-boot#36073 - Jetty core module is now independent of Servlet API. https://webtide.com/introducing-jetty-12/ - Due to the change, the existing `JettyService` code can no longer be reused, so `JettyService` is newly implemented based on the Jetty 12 API. - `JettyServiceBuilder` - `JettyServiceBuilder.tlsReverseDnsLookup()` is removed because Jetty `ServletApiRequest.getRemoteHost()` does not perform a reverse DNS lookup. - `JettyServiceBuilder.handlerWrapper(HandlerWrapper)` has been removed in favor of `JettyServiceBuilder.insertHandler(Handler.Singleton)` - `HandlerWrapper` does not exist in Jetty 12. - `insertHandler(Handler.Singleton)` is the most similar replacement. - `JettyServiceBuilder.sessionIdManager(SessionIdManager)` and `sessionIdManagerFactory(Function)` have been removed because `Server.setSessionIdManager()` does not exist. - Instead, `SessionIdManager` can be set via `JettyServiceBuilder.bean()` https://eclipse.dev/jetty/documentation/jetty-12/programming-guide/index.html#pg-server-session-idmgr - `JettyService` - Jetty `Request` becomes immutable so Armeria request headers are indirectly set via `HttpChannel.onRequest()` - `HttpStreamOverHTTP1` provides a request body instead of `HttpChannelOverHttp`. - A response is now written to `HttpStreamOverHTTP1.send(...)`. Previously, `HttpConnection.send(...)` was used. - Failed to find the counterpart of `jReq.setDispatcherType()` and `jReq.setAsyncSupported()`. - Without `setAsyncSupported`, async could support via `Callback` interface. - `httpChannel.handle()` has been replaced with `httpChannel.onRequest(requestMetadata).run()`.
Work in progress is available in https://github.com/wilkinsona/spring-boot/tree/jetty-12. Related Jetty issues with 12.0.0.beta2:
The text was updated successfully, but these errors were encountered: