From b8df90ad20b75b82b70ce166e3522f491b4a8dda Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 13 Mar 2025 17:01:55 +0000 Subject: [PATCH] Create spring-boot-jetty module See gh-46075 --- settings.gradle | 1 + .../build.gradle | 1 + .../jetty/JettyAccessLogCustomizer.java | 2 +- ...iveManagementContextAutoConfiguration.java | 2 +- ...letManagementContextAutoConfiguration.java | 2 +- .../JettyMetricsAutoConfigurationTests.java | 8 +-- .../spring-boot-actuator/build.gradle | 1 + .../web/jetty/AbstractJettyMetricsBinder.java | 2 +- .../build.gradle | 1 + .../ServletWebServerMvcIntegrationTests.java | 2 +- .../spring-boot-all/build.gradle | 5 -- .../build.gradle | 1 + ...itional-spring-configuration-metadata.json | 57 ---------------- ...ot.autoconfigure.AutoConfiguration.imports | 2 - .../MultipartAutoConfigurationTests.java | 2 +- .../spring-boot-dependencies/build.gradle | 1 + .../spring-boot-docs/build.gradle | 2 + .../spring-boot-jetty/build.gradle | 58 ++++++++++++++++ .../ConfigurableJettyWebServerFactory.java | 2 +- .../boot}/jetty/ForwardHeadersCustomizer.java | 2 +- .../boot}/jetty/GracefulShutdown.java | 2 +- .../boot}/jetty/JettyHandlerWrappers.java | 2 +- .../boot}/jetty/JettyServerCustomizer.java | 4 +- .../boot}/jetty/JettyWebServer.java | 4 +- .../boot}/jetty/JettyWebServerFactory.java | 2 +- .../boot}/jetty/SslServerCustomizer.java | 2 +- .../autoconfigure}/JettyServerProperties.java | 2 +- .../jetty/autoconfigure}/JettyThreadPool.java | 4 +- ...tualThreadsWebServerFactoryCustomizer.java | 4 +- .../JettyWebServerConfiguration.java | 6 +- .../JettyWebServerFactoryCustomizer.java | 6 +- .../jetty/autoconfigure}/package-info.java | 2 +- ...ttyReactiveWebServerAutoConfiguration.java | 10 +-- ...ttyReactiveWebServerFactoryCustomizer.java | 4 +- .../autoconfigure/reactive}/package-info.java | 2 +- ...ettyServletWebServerAutoConfiguration.java | 10 +-- ...ettyServletWebServerFactoryCustomizer.java | 4 +- .../autoconfigure/servlet}/package-info.java | 2 +- .../boot}/jetty/package-info.java | 6 +- .../JettyReactiveWebServerFactory.java | 14 ++-- .../boot/jetty/reactive}/package-info.java | 2 +- .../jetty/servlet}/JasperInitializer.java | 2 +- .../servlet}/JettyEmbeddedErrorHandler.java | 2 +- .../servlet}/JettyEmbeddedWebAppContext.java | 4 +- .../jetty/servlet}/JettyServletWebServer.java | 4 +- .../JettyServletWebServerFactory.java | 12 ++-- .../jetty/servlet}/LoaderHidingResource.java | 2 +- ...ervletContextInitializerConfiguration.java | 2 +- .../boot/jetty/servlet}/package-info.java | 2 +- ...itional-spring-configuration-metadata.json | 62 ++++++++++++++++++ ...ot.autoconfigure.AutoConfiguration.imports | 2 + .../boot}/jetty/JettyAccess.java | 2 +- .../boot}/jetty/SslServerCustomizerTests.java | 2 +- .../JettyServerPropertiesTests.java | 6 +- ...hreadsWebServerFactoryCustomizerTests.java | 4 +- .../JettyWebServerFactoryCustomizerTests.java | 8 +-- ...activeWebServerAutoConfigurationTests.java | 8 +-- ...ervletWebServerAutoConfigurationTests.java | 6 +- ...tWebServerServletContextListenerTests.java | 4 +- .../JettyReactiveWebServerFactoryTests.java | 8 +-- .../JettyServletWebServerFactoryTests.java | 8 +-- .../servlet}/LoaderHidingResourceTests.java | 2 +- .../boot/jetty/servlet}/test.jks | Bin .../org/springframework/boot}/jetty/test.jks | Bin .../spring-boot-starter-jetty/build.gradle | 3 +- .../spring-boot-server-tests-app/build.gradle | 2 +- .../example/JettyServerCustomizerConfig.java | 2 +- ...omContainerWebSocketsApplicationTests.java | 2 +- 68 files changed, 237 insertions(+), 172 deletions(-) create mode 100644 spring-boot-project/spring-boot-jetty/build.gradle rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-jetty/src/main/java/org/springframework/boot}/jetty/ConfigurableJettyWebServerFactory.java (97%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-jetty/src/main/java/org/springframework/boot}/jetty/ForwardHeadersCustomizer.java (96%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-jetty/src/main/java/org/springframework/boot}/jetty/GracefulShutdown.java (98%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-jetty/src/main/java/org/springframework/boot}/jetty/JettyHandlerWrappers.java (97%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-jetty/src/main/java/org/springframework/boot}/jetty/JettyServerCustomizer.java (87%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-jetty/src/main/java/org/springframework/boot}/jetty/JettyWebServer.java (98%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-jetty/src/main/java/org/springframework/boot}/jetty/JettyWebServerFactory.java (99%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-jetty/src/main/java/org/springframework/boot}/jetty/SslServerCustomizer.java (99%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure}/JettyServerProperties.java (99%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure}/JettyThreadPool.java (92%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure}/JettyVirtualThreadsWebServerFactoryCustomizer.java (93%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure}/JettyWebServerConfiguration.java (87%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure}/JettyWebServerFactoryCustomizer.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure}/package-info.java (91%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive}/JettyReactiveWebServerAutoConfiguration.java (88%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive}/WebSocketJettyReactiveWebServerFactoryCustomizer.java (95%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive}/package-info.java (90%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet}/JettyServletWebServerAutoConfiguration.java (91%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet}/WebSocketJettyServletWebServerFactoryCustomizer.java (94%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet}/package-info.java (90%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-jetty/src/main/java/org/springframework/boot}/jetty/package-info.java (75%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/reactive}/JettyReactiveWebServerFactory.java (89%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/reactive}/package-info.java (92%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet}/JasperInitializer.java (98%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet}/JettyEmbeddedErrorHandler.java (95%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet}/JettyEmbeddedWebAppContext.java (93%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet}/JettyServletWebServer.java (93%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet}/JettyServletWebServerFactory.java (98%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet}/LoaderHidingResource.java (98%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet}/ServletContextInitializerConfiguration.java (97%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet}/package-info.java (92%) create mode 100644 spring-boot-project/spring-boot-jetty/src/main/resources/META-INF/additional-spring-configuration-metadata.json create mode 100644 spring-boot-project/spring-boot-jetty/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server => spring-boot-jetty/src/test/java/org/springframework/boot}/jetty/JettyAccess.java (94%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server => spring-boot-jetty/src/test/java/org/springframework/boot}/jetty/SslServerCustomizerTests.java (99%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty => spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure}/JettyServerPropertiesTests.java (96%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty => spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure}/JettyVirtualThreadsWebServerFactoryCustomizerTests.java (94%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty => spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure}/JettyWebServerFactoryCustomizerTests.java (98%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty => spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/reactive}/JettyReactiveWebServerAutoConfigurationTests.java (93%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty => spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet}/JettyServletWebServerAutoConfigurationTests.java (95%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty => spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet}/JettyServletWebServerServletContextListenerTests.java (89%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server/reactive/jetty => spring-boot-jetty/src/test/java/org/springframework/boot/jetty/reactive}/JettyReactiveWebServerFactoryTests.java (96%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/test/java/org/springframework/boot/jetty/servlet}/JettyServletWebServerFactoryTests.java (98%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/jetty => spring-boot-jetty/src/test/java/org/springframework/boot/jetty/servlet}/LoaderHidingResourceTests.java (98%) rename spring-boot-project/{spring-boot-all/src/test/resources/org/springframework/boot/web/server/jetty => spring-boot-jetty/src/test/resources/org/springframework/boot/jetty/servlet}/test.jks (100%) rename spring-boot-project/{spring-boot-all/src/test/resources/org/springframework/boot/web/server/servlet => spring-boot-jetty/src/test/resources/org/springframework/boot}/jetty/test.jks (100%) diff --git a/settings.gradle b/settings.gradle index 55079242af5..07dae646153 100644 --- a/settings.gradle +++ b/settings.gradle @@ -64,6 +64,7 @@ include "spring-boot-project:spring-boot-dependencies" include "spring-boot-project:spring-boot-devtools" include "spring-boot-project:spring-boot-docker-compose" include "spring-boot-project:spring-boot-docs" +include "spring-boot-project:spring-boot-jetty" include "spring-boot-project:spring-boot-parent" include "spring-boot-project:spring-boot-test" include "spring-boot-project:spring-boot-test-autoconfigure" diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index 18aa7c5dca3..b3c3352e604 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -33,6 +33,7 @@ dependencies { implementation("com.fasterxml.jackson.core:jackson-databind") implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") + optional(project(":spring-boot-project:spring-boot-jetty")) optional(project(":spring-boot-project:spring-boot-tomcat")) optional(project(":spring-boot-project:spring-boot-undertow")) optional("ch.qos.logback:logback-classic") diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyAccessLogCustomizer.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyAccessLogCustomizer.java index e05fa6278d0..6d1fcfd53f4 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyAccessLogCustomizer.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyAccessLogCustomizer.java @@ -24,8 +24,8 @@ import org.eclipse.jetty.server.RequestLogWriter; import org.eclipse.jetty.server.Server; import org.springframework.boot.actuate.autoconfigure.web.server.AccessLogCustomizer; +import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.jetty.ConfigurableJettyWebServerFactory; import org.springframework.util.StringUtils; /** diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyReactiveManagementContextAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyReactiveManagementContextAutoConfiguration.java index 6fb22ed26cf..50588d37593 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyReactiveManagementContextAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyReactiveManagementContextAutoConfiguration.java @@ -26,7 +26,7 @@ import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; -import org.springframework.boot.autoconfigure.web.server.reactive.jetty.JettyReactiveWebServerAutoConfiguration; +import org.springframework.boot.jetty.autoconfigure.reactive.JettyReactiveWebServerAutoConfiguration; import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyServletManagementContextAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyServletManagementContextAutoConfiguration.java index 5c882b4fec8..98ad8deb2c2 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyServletManagementContextAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/jetty/JettyServletManagementContextAutoConfiguration.java @@ -26,7 +26,7 @@ import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; -import org.springframework.boot.autoconfigure.web.server.servlet.jetty.JettyServletWebServerAutoConfiguration; +import org.springframework.boot.jetty.autoconfigure.servlet.JettyServletWebServerAutoConfiguration; import org.springframework.boot.web.server.servlet.ServletWebServerFactory; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/jetty/JettyMetricsAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/jetty/JettyMetricsAutoConfigurationTests.java index d9be067c6c9..a491826f4e3 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/jetty/JettyMetricsAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/jetty/JettyMetricsAutoConfigurationTests.java @@ -26,15 +26,15 @@ import org.springframework.boot.actuate.metrics.web.jetty.JettyConnectionMetrics import org.springframework.boot.actuate.metrics.web.jetty.JettyServerThreadPoolMetricsBinder; import org.springframework.boot.actuate.metrics.web.jetty.JettySslHandshakeMetricsBinder; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.web.server.reactive.jetty.JettyReactiveWebServerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.server.servlet.jetty.JettyServletWebServerAutoConfiguration; import org.springframework.boot.context.event.ApplicationStartedEvent; +import org.springframework.boot.jetty.autoconfigure.reactive.JettyReactiveWebServerAutoConfiguration; +import org.springframework.boot.jetty.autoconfigure.servlet.JettyServletWebServerAutoConfiguration; +import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.boot.testsupport.classpath.resources.WithPackageResources; import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext; -import org.springframework.boot.web.server.reactive.jetty.JettyReactiveWebServerFactory; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-project/spring-boot-actuator/build.gradle b/spring-boot-project/spring-boot-actuator/build.gradle index a6cb3245494..40cf660b539 100644 --- a/spring-boot-project/spring-boot-actuator/build.gradle +++ b/spring-boot-project/spring-boot-actuator/build.gradle @@ -39,6 +39,7 @@ dependencies { dockerTestImplementation("org.testcontainers:neo4j") dockerTestImplementation("org.testcontainers:testcontainers") + optional(project(":spring-boot-project:spring-boot-jetty")) optional(project(":spring-boot-project:spring-boot-tomcat")) optional(project(":spring-boot-project:spring-boot-undertow")) optional("org.apache.cassandra:java-driver-core") { diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/jetty/AbstractJettyMetricsBinder.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/jetty/AbstractJettyMetricsBinder.java index dbdcb4a554c..3b73f7a41bc 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/jetty/AbstractJettyMetricsBinder.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/jetty/AbstractJettyMetricsBinder.java @@ -19,9 +19,9 @@ package org.springframework.boot.actuate.metrics.web.jetty; import org.eclipse.jetty.server.Server; import org.springframework.boot.context.event.ApplicationStartedEvent; +import org.springframework.boot.jetty.JettyWebServer; import org.springframework.boot.web.context.WebServerApplicationContext; import org.springframework.boot.web.server.WebServer; -import org.springframework.boot.web.server.jetty.JettyWebServer; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationListener; diff --git a/spring-boot-project/spring-boot-all-integration-tests/build.gradle b/spring-boot-project/spring-boot-all-integration-tests/build.gradle index d4b50ea50a0..a2b864f38dc 100644 --- a/spring-boot-project/spring-boot-all-integration-tests/build.gradle +++ b/spring-boot-project/spring-boot-all-integration-tests/build.gradle @@ -23,6 +23,7 @@ description = "Spring Boot Integration Tests" dependencies { testImplementation(project(":spring-boot-project:spring-boot-all")) + testImplementation(project(":spring-boot-project:spring-boot-jetty")) testImplementation(project(":spring-boot-project:spring-boot-tomcat")) testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) testImplementation(project(":spring-boot-project:spring-boot-undertow")) diff --git a/spring-boot-project/spring-boot-all-integration-tests/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerMvcIntegrationTests.java b/spring-boot-project/spring-boot-all-integration-tests/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerMvcIntegrationTests.java index 0ff5b9c7138..a69716be9b6 100644 --- a/spring-boot-project/spring-boot-all-integration-tests/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerMvcIntegrationTests.java +++ b/spring-boot-project/spring-boot-all-integration-tests/src/test/java/org/springframework/boot/web/servlet/context/ServletWebServerMvcIntegrationTests.java @@ -21,13 +21,13 @@ import java.net.URI; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.boot.testsupport.web.servlet.DirtiesUrlFactories; import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory; import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.server.servlet.ServletWebServerFactory; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-all/build.gradle b/spring-boot-project/spring-boot-all/build.gradle index 03fa052a2c8..852bf5f27e9 100644 --- a/spring-boot-project/spring-boot-all/build.gradle +++ b/spring-boot-project/spring-boot-all/build.gradle @@ -65,12 +65,7 @@ dependencies { optional("org.apache.groovy:groovy") optional("org.apache.groovy:groovy-xml") optional("org.crac:crac") - optional("org.eclipse.jetty:jetty-alpn-conscrypt-server") optional("org.eclipse.jetty:jetty-client") - optional("org.eclipse.jetty:jetty-util") - optional("org.eclipse.jetty.ee10:jetty-ee10-servlets") - optional("org.eclipse.jetty.ee10:jetty-ee10-webapp") - optional("org.eclipse.jetty.http2:jetty-http2-server") optional("org.flywaydb:flyway-core") optional("org.hamcrest:hamcrest-library") optional("org.hibernate.orm:hibernate-core") diff --git a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle index ace91bea18b..8fc2510c311 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle @@ -234,6 +234,7 @@ dependencies { optional("org.thymeleaf.extras:thymeleaf-extras-springsecurity6") optional("redis.clients:jedis") + testImplementation(project(":spring-boot-project:spring-boot-jetty")) testImplementation(project(":spring-boot-project:spring-boot-test")) testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) testImplementation(project(":spring-boot-project:spring-boot-undertow")) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 98cc207b2ce..972e4ada7be 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -1,63 +1,6 @@ { "groups": [], "properties": [ - { - "name": "server.jetty.accesslog.date-format", - "deprecation": { - "replacement": "server.jetty.accesslog.custom-format", - "level": "error" - } - }, - { - "name": "server.jetty.accesslog.extended-format", - "deprecation": { - "replacement": "server.jetty.accesslog.format", - "level": "error" - } - }, - { - "name": "server.jetty.accesslog.locale", - "deprecation": { - "replacement": "server.jetty.accesslog.custom-format", - "level": "error" - } - }, - { - "name": "server.jetty.accesslog.log-cookies", - "deprecation": { - "replacement": "server.jetty.accesslog.custom-format", - "level": "error" - } - }, - { - "name": "server.jetty.accesslog.log-latency", - "deprecation": { - "replacement": "server.jetty.accesslog.custom-format", - "level": "error" - } - }, - { - "name": "server.jetty.accesslog.log-server", - "deprecation": { - "replacement": "server.jetty.accesslog.custom-format", - "level": "error" - } - }, - { - "name": "server.jetty.accesslog.time-zone", - "deprecation": { - "replacement": "server.jetty.accesslog.custom-format", - "level": "error" - } - }, - { - "name": "server.jetty.max-http-post-size", - "type": "org.springframework.util.unit.DataSize", - "deprecation": { - "replacement": "server.jetty.max-http-form-post-size", - "level": "error" - } - }, { "name": "server.netty.max-chunk-size", "deprecation": { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 0162d9d435c..94f08e821f1 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -132,9 +132,7 @@ org.springframework.boot.autoconfigure.web.reactive.WebSessionIdResolverAutoConf org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration org.springframework.boot.autoconfigure.web.reactive.function.client.ClientHttpConnectorAutoConfiguration org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration -org.springframework.boot.autoconfigure.web.server.reactive.jetty.JettyReactiveWebServerAutoConfiguration org.springframework.boot.autoconfigure.web.server.reactive.netty.NettyReactiveWebServerAutoConfiguration -org.springframework.boot.autoconfigure.web.server.servlet.jetty.JettyServletWebServerAutoConfiguration org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java index 6474cb91218..50be78709cb 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java @@ -28,13 +28,13 @@ import org.junit.jupiter.params.provider.MethodSource; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.boot.testsupport.classpath.ForkedClassPath; import org.springframework.boot.testsupport.web.servlet.DirtiesUrlFactories; import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration; import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory; import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index a4bab432688..7976242734e 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1993,6 +1993,7 @@ bom { "spring-boot-devtools", "spring-boot-docker-compose", "spring-boot-jarmode-tools", + "spring-boot-jetty", "spring-boot-loader", "spring-boot-loader-classic", "spring-boot-loader-tools", diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 03d6f40ad0e..c93aad6de84 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -79,6 +79,7 @@ dependencies { autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata")) + autoConfiguration(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-undertow", configuration: "autoConfigurationMetadata")) @@ -90,6 +91,7 @@ dependencies { configurationProperties(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata")) + configurationProperties(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-test-autoconfigure", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "configurationPropertiesMetadata")) diff --git a/spring-boot-project/spring-boot-jetty/build.gradle b/spring-boot-project/spring-boot-jetty/build.gradle new file mode 100644 index 00000000000..4a3a9c5b1ba --- /dev/null +++ b/spring-boot-project/spring-boot-jetty/build.gradle @@ -0,0 +1,58 @@ +/* + * Copyright 2012-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +plugins { + id "java-library" + id "org.springframework.boot.auto-configuration" + id "org.springframework.boot.configuration-properties" + id "org.springframework.boot.deployed" + id "org.springframework.boot.optional-dependencies" +} + +description = "Spring Boot Jetty" + +dependencies { + api(project(":spring-boot-project:spring-boot")) + api("org.eclipse.jetty.ee10:jetty-ee10-servlets") + api("org.eclipse.jetty.ee10:jetty-ee10-webapp") + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional("org.apache.tomcat.embed:tomcat-embed-jasper") + optional("org.eclipse.jetty:jetty-alpn-conscrypt-server") + optional("org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jakarta-server") + optional("org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jetty-server") + optional("org.eclipse.jetty.http2:jetty-http2-server") + optional("org.springframework:spring-webflux") + + testImplementation(project(":spring-boot-project:spring-boot-test")) + testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) + testImplementation(testFixtures(project(":spring-boot-project:spring-boot"))) + testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure"))) + testImplementation("org.apache.httpcomponents.client5:httpclient5") + + testRuntimeOnly("ch.qos.logback:logback-classic") + testRuntimeOnly("io.projectreactor:reactor-test") + testRuntimeOnly("io.projectreactor.netty:reactor-netty-http") + testRuntimeOnly("org.eclipse.jetty:jetty-client") + testRuntimeOnly("org.eclipse.jetty.http2:jetty-http2-client") + testRuntimeOnly("org.eclipse.jetty.http2:jetty-http2-client-transport") +} + +test { + jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED" +} + diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/ConfigurableJettyWebServerFactory.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/ConfigurableJettyWebServerFactory.java similarity index 97% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/ConfigurableJettyWebServerFactory.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/ConfigurableJettyWebServerFactory.java index e2c2f7ae719..ffcc3d07f1f 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/ConfigurableJettyWebServerFactory.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/ConfigurableJettyWebServerFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.util.thread.ThreadPool; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/ForwardHeadersCustomizer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/ForwardHeadersCustomizer.java similarity index 96% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/ForwardHeadersCustomizer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/ForwardHeadersCustomizer.java index e59e9ca0362..c1394ddcd06 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/ForwardHeadersCustomizer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/ForwardHeadersCustomizer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.Connector; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/GracefulShutdown.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/GracefulShutdown.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/GracefulShutdown.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/GracefulShutdown.java index c07ffe94fc7..da378e38ff3 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/GracefulShutdown.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/GracefulShutdown.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; import java.lang.reflect.Method; import java.util.concurrent.CompletableFuture; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyHandlerWrappers.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyHandlerWrappers.java similarity index 97% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyHandlerWrappers.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyHandlerWrappers.java index 36e008a56a4..7866924af09 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyHandlerWrappers.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyHandlerWrappers.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; import org.eclipse.jetty.http.HttpFields.Mutable; import org.eclipse.jetty.http.HttpMethod; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyServerCustomizer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyServerCustomizer.java similarity index 87% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyServerCustomizer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyServerCustomizer.java index 1a381c03e5a..c310dce5a03 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyServerCustomizer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyServerCustomizer.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; import org.eclipse.jetty.server.Server; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; /** * Callback interface that can be used to customize a Jetty {@link Server}. diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyWebServer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyWebServer.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyWebServer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyWebServer.java index 4aab87196b7..480bc46c49a 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyWebServer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyWebServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; import java.io.IOException; import java.util.Collection; @@ -33,12 +33,12 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.server.handler.StatisticsHandler; +import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory; import org.springframework.boot.web.server.GracefulShutdownCallback; import org.springframework.boot.web.server.GracefulShutdownResult; import org.springframework.boot.web.server.PortInUseException; import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.server.WebServerException; -import org.springframework.boot.web.server.reactive.jetty.JettyReactiveWebServerFactory; import org.springframework.http.server.reactive.ServletHttpHandlerAdapter; import org.springframework.util.Assert; import org.springframework.util.StringUtils; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyWebServerFactory.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyWebServerFactory.java similarity index 99% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyWebServerFactory.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyWebServerFactory.java index 8dd53da66d8..eb5e3dff8fc 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/JettyWebServerFactory.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/JettyWebServerFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; import java.net.InetSocketAddress; import java.util.ArrayList; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/SslServerCustomizer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/SslServerCustomizer.java similarity index 99% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/SslServerCustomizer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/SslServerCustomizer.java index d6269a87a87..8cf0287434a 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/SslServerCustomizer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/SslServerCustomizer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; import java.net.InetSocketAddress; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyServerProperties.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyServerProperties.java similarity index 99% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyServerProperties.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyServerProperties.java index ce81fd71b9a..b8e7b4a8665 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyServerProperties.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyServerProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.jetty; +package org.springframework.boot.jetty.autoconfigure; import java.time.Duration; import java.util.List; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyThreadPool.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyThreadPool.java similarity index 92% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyThreadPool.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyThreadPool.java index 76b10199310..8671dd15000 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyThreadPool.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyThreadPool.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.jetty; +package org.springframework.boot.jetty.autoconfigure; import java.util.concurrent.BlockingQueue; import java.util.concurrent.SynchronousQueue; @@ -25,7 +25,7 @@ import org.eclipse.jetty.util.thread.ThreadPool; /** * Creates a {@link ThreadPool} for Jetty, applying - * {@link org.springframework.boot.autoconfigure.web.server.jetty.JettyServerProperties.Threads + * {@link org.springframework.boot.jetty.autoconfigure.JettyServerProperties.Threads * ServerProperties.Jetty.Threads Jetty thread properties}. * * @author Moritz Halbritter diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyVirtualThreadsWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyVirtualThreadsWebServerFactoryCustomizer.java similarity index 93% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyVirtualThreadsWebServerFactoryCustomizer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyVirtualThreadsWebServerFactoryCustomizer.java index cea6ec69617..99641e1efe1 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyVirtualThreadsWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyVirtualThreadsWebServerFactoryCustomizer.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.jetty; +package org.springframework.boot.jetty.autoconfigure; import org.eclipse.jetty.util.VirtualThreads; import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; +import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.jetty.ConfigurableJettyWebServerFactory; import org.springframework.context.EnvironmentAware; import org.springframework.core.Ordered; import org.springframework.core.env.Environment; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyWebServerConfiguration.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerConfiguration.java similarity index 87% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyWebServerConfiguration.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerConfiguration.java index 36b3c62a61d..62729bad506 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyWebServerConfiguration.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerConfiguration.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.jetty; +package org.springframework.boot.jetty.autoconfigure; import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeployment; import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading; import org.springframework.boot.autoconfigure.thread.Threading; import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.autoconfigure.web.server.reactive.jetty.JettyReactiveWebServerAutoConfiguration; -import org.springframework.boot.autoconfigure.web.server.servlet.jetty.JettyServletWebServerAutoConfiguration; +import org.springframework.boot.jetty.autoconfigure.reactive.JettyReactiveWebServerAutoConfiguration; +import org.springframework.boot.jetty.autoconfigure.servlet.JettyServletWebServerAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizer.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyWebServerFactoryCustomizer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizer.java index b848019cd0d..b01a5677498 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.jetty; +package org.springframework.boot.jetty.autoconfigure; import java.time.Duration; import java.util.Arrays; @@ -33,11 +33,11 @@ import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.RequestLogWriter; import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.autoconfigure.web.server.jetty.JettyServerProperties.Accesslog; import org.springframework.boot.cloud.CloudPlatform; import org.springframework.boot.context.properties.PropertyMapper; +import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory; +import org.springframework.boot.jetty.autoconfigure.JettyServerProperties.Accesslog; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.jetty.ConfigurableJettyWebServerFactory; import org.springframework.core.Ordered; import org.springframework.core.env.Environment; import org.springframework.util.CollectionUtils; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/package-info.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/package-info.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/package-info.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/package-info.java index 2cffb244db7..e8d05d5e796 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/jetty/package-info.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/package-info.java @@ -18,4 +18,4 @@ * Classes related to the auto-configuration of a servlet or reactive web server using * Jetty. */ -package org.springframework.boot.autoconfigure.web.server.jetty; +package org.springframework.boot.jetty.autoconfigure; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/JettyReactiveWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfiguration.java similarity index 88% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/JettyReactiveWebServerAutoConfiguration.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfiguration.java index bc55a6da6f9..1b18b87634b 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/JettyReactiveWebServerAutoConfiguration.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.reactive.jetty; +package org.springframework.boot.jetty.autoconfigure.reactive; import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jetty.ee10.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer; @@ -26,13 +26,13 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; -import org.springframework.boot.autoconfigure.web.server.jetty.JettyServerProperties; -import org.springframework.boot.autoconfigure.web.server.jetty.JettyWebServerConfiguration; import org.springframework.boot.autoconfigure.web.server.reactive.ReactiveWebServerConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.boot.web.server.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.autoconfigure.JettyServerProperties; +import org.springframework.boot.jetty.autoconfigure.JettyWebServerConfiguration; +import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory; import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory; -import org.springframework.boot.web.server.reactive.jetty.JettyReactiveWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/WebSocketJettyReactiveWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/WebSocketJettyReactiveWebServerFactoryCustomizer.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/WebSocketJettyReactiveWebServerFactoryCustomizer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/WebSocketJettyReactiveWebServerFactoryCustomizer.java index ed5e310dbae..f4b69888788 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/WebSocketJettyReactiveWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/WebSocketJettyReactiveWebServerFactoryCustomizer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.reactive.jetty; +package org.springframework.boot.jetty.autoconfigure.reactive; import jakarta.servlet.ServletContext; import org.eclipse.jetty.ee10.servlet.ServletContextHandler; @@ -25,8 +25,8 @@ import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.websocket.core.server.WebSocketMappings; import org.eclipse.jetty.websocket.core.server.WebSocketServerComponents; +import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.reactive.jetty.JettyReactiveWebServerFactory; import org.springframework.core.Ordered; /** diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/package-info.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/package-info.java similarity index 90% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/package-info.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/package-info.java index cb641f6d96a..0721179b503 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/package-info.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/package-info.java @@ -17,4 +17,4 @@ /** * Classes related to the auto-configuration of a reactive web server using Jetty. */ -package org.springframework.boot.autoconfigure.web.server.reactive.jetty; +package org.springframework.boot.jetty.autoconfigure.reactive; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/JettyServletWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfiguration.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/JettyServletWebServerAutoConfiguration.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfiguration.java index 1365e8ec3c7..90a54b34b1c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/JettyServletWebServerAutoConfiguration.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.jetty; +package org.springframework.boot.jetty.autoconfigure.servlet; import java.util.EnumSet; @@ -36,14 +36,14 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeplo import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.condition.SearchStrategy; -import org.springframework.boot.autoconfigure.web.server.jetty.JettyServerProperties; -import org.springframework.boot.autoconfigure.web.server.jetty.JettyWebServerConfiguration; import org.springframework.boot.autoconfigure.web.server.servlet.ServletWebServerConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.autoconfigure.JettyServerProperties; +import org.springframework.boot.jetty.autoconfigure.JettyWebServerConfiguration; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.jetty.JettyServerCustomizer; import org.springframework.boot.web.server.servlet.ServletWebServerFactory; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/WebSocketJettyServletWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/WebSocketJettyServletWebServerFactoryCustomizer.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/WebSocketJettyServletWebServerFactoryCustomizer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/WebSocketJettyServletWebServerFactoryCustomizer.java index a544d016433..03d65d0d9ac 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/WebSocketJettyServletWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/WebSocketJettyServletWebServerFactoryCustomizer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.jetty; +package org.springframework.boot.jetty.autoconfigure.servlet; import org.eclipse.jetty.ee10.webapp.AbstractConfiguration; import org.eclipse.jetty.ee10.webapp.WebAppContext; @@ -24,8 +24,8 @@ import org.eclipse.jetty.ee10.websocket.servlet.WebSocketUpgradeFilter; import org.eclipse.jetty.websocket.core.server.WebSocketMappings; import org.eclipse.jetty.websocket.core.server.WebSocketServerComponents; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; import org.springframework.core.Ordered; /** diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/package-info.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/package-info.java similarity index 90% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/package-info.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/package-info.java index 68b5e460f23..e8da927e49c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/package-info.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/package-info.java @@ -17,4 +17,4 @@ /** * Classes related to the auto-configuration of a servlet web server using Jetty. */ -package org.springframework.boot.autoconfigure.web.server.servlet.jetty; +package org.springframework.boot.jetty.autoconfigure.servlet; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/package-info.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/package-info.java similarity index 75% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/package-info.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/package-info.java index ad6ea1a534e..79021863cfc 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/jetty/package-info.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/package-info.java @@ -17,7 +17,7 @@ /** * Reactive and servlet web server implementations backed by Jetty. * - * @see org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory - * @see org.springframework.boot.web.server.reactive.jetty.JettyReactiveWebServerFactory + * @see org.springframework.boot.jetty.servlet.JettyServletWebServerFactory + * @see org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/jetty/JettyReactiveWebServerFactory.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/reactive/JettyReactiveWebServerFactory.java similarity index 89% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/jetty/JettyReactiveWebServerFactory.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/reactive/JettyReactiveWebServerFactory.java index fa3110d5adc..5698f1f3de1 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/jetty/JettyReactiveWebServerFactory.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/reactive/JettyReactiveWebServerFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.reactive.jetty; +package org.springframework.boot.jetty.reactive; import java.net.InetSocketAddress; @@ -26,17 +26,17 @@ import org.eclipse.jetty.server.ConnectionLimit; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.StatisticsHandler; +import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory; +import org.springframework.boot.jetty.ForwardHeadersCustomizer; +import org.springframework.boot.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.JettyWebServer; +import org.springframework.boot.jetty.JettyWebServerFactory; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.web.server.Shutdown; import org.springframework.boot.web.server.Ssl; import org.springframework.boot.web.server.WebServer; -import org.springframework.boot.web.server.jetty.ConfigurableJettyWebServerFactory; -import org.springframework.boot.web.server.jetty.ForwardHeadersCustomizer; -import org.springframework.boot.web.server.jetty.JettyServerCustomizer; -import org.springframework.boot.web.server.jetty.JettyWebServer; -import org.springframework.boot.web.server.jetty.JettyWebServerFactory; import org.springframework.boot.web.server.reactive.ConfigurableReactiveWebServerFactory; import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; import org.springframework.http.client.reactive.JettyResourceFactory; import org.springframework.http.server.reactive.HttpHandler; import org.springframework.http.server.reactive.ServletHttpHandlerAdapter; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/jetty/package-info.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/reactive/package-info.java similarity index 92% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/jetty/package-info.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/reactive/package-info.java index 52e2ffabced..c1000188baa 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/jetty/package-info.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/reactive/package-info.java @@ -18,4 +18,4 @@ * Reactive web server implementation backed by Jetty. * */ -package org.springframework.boot.web.server.reactive.jetty; +package org.springframework.boot.jetty.reactive; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JasperInitializer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JasperInitializer.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JasperInitializer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JasperInitializer.java index b88be28d59c..db005b569f5 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JasperInitializer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JasperInitializer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; import java.io.IOException; import java.io.InputStream; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyEmbeddedErrorHandler.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyEmbeddedErrorHandler.java similarity index 95% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyEmbeddedErrorHandler.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyEmbeddedErrorHandler.java index 913a4b7eb4c..b1263a98e7f 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyEmbeddedErrorHandler.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyEmbeddedErrorHandler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; import org.eclipse.jetty.ee10.servlet.ErrorPageErrorHandler; import org.eclipse.jetty.http.HttpMethod; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyEmbeddedWebAppContext.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyEmbeddedWebAppContext.java similarity index 93% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyEmbeddedWebAppContext.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyEmbeddedWebAppContext.java index 49935bcda9b..862185a72f4 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyEmbeddedWebAppContext.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyEmbeddedWebAppContext.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; import org.eclipse.jetty.ee10.servlet.ServletHandler; import org.eclipse.jetty.ee10.webapp.WebAppContext; import org.eclipse.jetty.util.ClassMatcher; -import org.springframework.boot.web.server.jetty.JettyWebServer; +import org.springframework.boot.jetty.JettyWebServer; /** * Jetty {@link WebAppContext} used by {@link JettyWebServer} to support deferred diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyServletWebServer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyServletWebServer.java similarity index 93% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyServletWebServer.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyServletWebServer.java index 79bcbf70438..4dc3321bbb6 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyServletWebServer.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyServletWebServer.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; import java.util.List; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; -import org.springframework.boot.web.server.jetty.JettyWebServer; +import org.springframework.boot.jetty.JettyWebServer; /** * Servlet-specific {@link JettyWebServer}. diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyServletWebServerFactory.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyServletWebServerFactory.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyServletWebServerFactory.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyServletWebServerFactory.java index ba70fde7190..db6adf2d341 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/JettyServletWebServerFactory.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/JettyServletWebServerFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; import java.io.File; import java.net.InetSocketAddress; @@ -68,17 +68,17 @@ import org.eclipse.jetty.util.resource.Resource; import org.eclipse.jetty.util.resource.ResourceFactory; import org.eclipse.jetty.util.resource.URLResourceFactory; +import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory; +import org.springframework.boot.jetty.ForwardHeadersCustomizer; +import org.springframework.boot.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.JettyWebServer; +import org.springframework.boot.jetty.JettyWebServerFactory; import org.springframework.boot.web.server.Cookie.SameSite; import org.springframework.boot.web.server.ErrorPage; import org.springframework.boot.web.server.MimeMappings; import org.springframework.boot.web.server.Shutdown; import org.springframework.boot.web.server.Ssl; import org.springframework.boot.web.server.WebServer; -import org.springframework.boot.web.server.jetty.ConfigurableJettyWebServerFactory; -import org.springframework.boot.web.server.jetty.ForwardHeadersCustomizer; -import org.springframework.boot.web.server.jetty.JettyServerCustomizer; -import org.springframework.boot.web.server.jetty.JettyWebServer; -import org.springframework.boot.web.server.jetty.JettyWebServerFactory; import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory; import org.springframework.boot.web.server.servlet.ContextPath; import org.springframework.boot.web.server.servlet.CookieSameSiteSupplier; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/LoaderHidingResource.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/LoaderHidingResource.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/LoaderHidingResource.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/LoaderHidingResource.java index a3497c57842..8169e1cf16a 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/LoaderHidingResource.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/LoaderHidingResource.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; import java.io.IOException; import java.io.InputStream; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/ServletContextInitializerConfiguration.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/ServletContextInitializerConfiguration.java similarity index 97% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/ServletContextInitializerConfiguration.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/ServletContextInitializerConfiguration.java index e2b40858054..686f8d22286 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/ServletContextInitializerConfiguration.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/ServletContextInitializerConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; import jakarta.servlet.ServletException; import org.eclipse.jetty.ee10.webapp.AbstractConfiguration; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/package-info.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/package-info.java similarity index 92% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/package-info.java rename to spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/package-info.java index bb3a49b5aed..67911f859fe 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/jetty/package-info.java +++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/servlet/package-info.java @@ -17,4 +17,4 @@ /** * Servlet web server implementation backed by Jetty. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; diff --git a/spring-boot-project/spring-boot-jetty/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-jetty/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 00000000000..51c6d7bdd71 --- /dev/null +++ b/spring-boot-project/spring-boot-jetty/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,62 @@ +{ + "groups": [], + "properties": [ + { + "name": "server.jetty.accesslog.date-format", + "deprecation": { + "replacement": "server.jetty.accesslog.custom-format", + "level": "error" + } + }, + { + "name": "server.jetty.accesslog.extended-format", + "deprecation": { + "replacement": "server.jetty.accesslog.format", + "level": "error" + } + }, + { + "name": "server.jetty.accesslog.locale", + "deprecation": { + "replacement": "server.jetty.accesslog.custom-format", + "level": "error" + } + }, + { + "name": "server.jetty.accesslog.log-cookies", + "deprecation": { + "replacement": "server.jetty.accesslog.custom-format", + "level": "error" + } + }, + { + "name": "server.jetty.accesslog.log-latency", + "deprecation": { + "replacement": "server.jetty.accesslog.custom-format", + "level": "error" + } + }, + { + "name": "server.jetty.accesslog.log-server", + "deprecation": { + "replacement": "server.jetty.accesslog.custom-format", + "level": "error" + } + }, + { + "name": "server.jetty.accesslog.time-zone", + "deprecation": { + "replacement": "server.jetty.accesslog.custom-format", + "level": "error" + } + }, + { + "name": "server.jetty.max-http-post-size", + "type": "org.springframework.util.unit.DataSize", + "deprecation": { + "replacement": "server.jetty.max-http-form-post-size", + "level": "error" + } + } + ] +} diff --git a/spring-boot-project/spring-boot-jetty/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-jetty/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000000..485d3de1e44 --- /dev/null +++ b/spring-boot-project/spring-boot-jetty/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,2 @@ +org.springframework.boot.jetty.autoconfigure.reactive.JettyReactiveWebServerAutoConfiguration +org.springframework.boot.jetty.autoconfigure.servlet.JettyServletWebServerAutoConfiguration \ No newline at end of file diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/jetty/JettyAccess.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/JettyAccess.java similarity index 94% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/jetty/JettyAccess.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/JettyAccess.java index 6680e9342a5..2b6ccfa27a5 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/jetty/JettyAccess.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/JettyAccess.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; /** * Helper class to provide public access to package-private methods for testing purposes. diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/jetty/SslServerCustomizerTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/SslServerCustomizerTests.java similarity index 99% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/jetty/SslServerCustomizerTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/SslServerCustomizerTests.java index ca4e5829f4c..32ec00ff73a 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/jetty/SslServerCustomizerTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/SslServerCustomizerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.jetty; +package org.springframework.boot.jetty; import java.net.InetSocketAddress; import java.util.ArrayList; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyServerPropertiesTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyServerPropertiesTests.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyServerPropertiesTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyServerPropertiesTests.java index 4513ff416ee..5369cc634a1 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyServerPropertiesTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyServerPropertiesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.jetty; +package org.springframework.boot.jetty.autoconfigure; import java.time.Duration; import java.util.Collections; @@ -30,8 +30,8 @@ import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.source.ConfigurationPropertySource; import org.springframework.boot.context.properties.source.MapConfigurationPropertySource; -import org.springframework.boot.web.server.jetty.JettyWebServer; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; +import org.springframework.boot.jetty.JettyWebServer; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyVirtualThreadsWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyVirtualThreadsWebServerFactoryCustomizerTests.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyVirtualThreadsWebServerFactoryCustomizerTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyVirtualThreadsWebServerFactoryCustomizerTests.java index a52f32dbf21..935493da00f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyVirtualThreadsWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyVirtualThreadsWebServerFactoryCustomizerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.jetty; +package org.springframework.boot.jetty.autoconfigure; import java.time.Duration; import java.util.concurrent.Executor; @@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledForJreRange; import org.junit.jupiter.api.condition.JRE; -import org.springframework.boot.web.server.jetty.ConfigurableJettyWebServerFactory; +import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.assertArg; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizerTests.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyWebServerFactoryCustomizerTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizerTests.java index 16315696da2..87ca5c6b861 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/jetty/JettyWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.jetty; +package org.springframework.boot.jetty.autoconfigure; import java.io.File; import java.io.IOException; @@ -46,9 +46,9 @@ import org.springframework.boot.autoconfigure.web.ServerProperties.ForwardHeader import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.source.ConfigurationPropertySources; -import org.springframework.boot.web.server.jetty.ConfigurableJettyWebServerFactory; -import org.springframework.boot.web.server.jetty.JettyWebServer; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; +import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory; +import org.springframework.boot.jetty.JettyWebServer; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.mock.env.MockEnvironment; import org.springframework.test.context.support.TestPropertySourceUtils; import org.springframework.test.util.ReflectionTestUtils; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/JettyReactiveWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfigurationTests.java similarity index 93% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/JettyReactiveWebServerAutoConfigurationTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfigurationTests.java index 58605a2c8e0..39efc7a3100 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/jetty/JettyReactiveWebServerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.reactive.jetty; +package org.springframework.boot.jetty.autoconfigure.reactive; import jakarta.websocket.server.ServerContainer; import org.eclipse.jetty.ee10.servlet.ServletContextHandler; @@ -23,12 +23,12 @@ import org.eclipse.jetty.server.handler.StatisticsHandler; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.web.server.reactive.AbstractReactiveWebServerAutoConfigurationTests; +import org.springframework.boot.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.JettyWebServer; +import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory; import org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext; import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.jetty.JettyServerCustomizer; -import org.springframework.boot.web.server.jetty.JettyWebServer; -import org.springframework.boot.web.server.reactive.jetty.JettyReactiveWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/JettyServletWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfigurationTests.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/JettyServletWebServerAutoConfigurationTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfigurationTests.java index 08137c3aa1e..8bd285e2c84 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/JettyServletWebServerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.jetty; +package org.springframework.boot.jetty.autoconfigure.servlet; import java.util.Map; @@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.boot.autoconfigure.web.server.servlet.AbstractServletWebServerAutoConfigurationTests; +import org.springframework.boot.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.jetty.JettyServerCustomizer; import org.springframework.boot.web.server.servlet.ServletContextInitializer; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; import org.springframework.boot.web.servlet.AbstractFilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/JettyServletWebServerServletContextListenerTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerServletContextListenerTests.java similarity index 89% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/JettyServletWebServerServletContextListenerTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerServletContextListenerTests.java index 61fafab6942..c75a0d30ad6 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/jetty/JettyServletWebServerServletContextListenerTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerServletContextListenerTests.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.jetty; +package org.springframework.boot.jetty.autoconfigure.servlet; import jakarta.servlet.ServletContextListener; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.web.server.servlet.AbstractServletWebServerServletContextListenerTests; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/reactive/jetty/JettyReactiveWebServerFactoryTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/reactive/JettyReactiveWebServerFactoryTests.java similarity index 96% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/reactive/jetty/JettyReactiveWebServerFactoryTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/reactive/JettyReactiveWebServerFactoryTests.java index 11368e9c6fc..bddbf14c10d 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/reactive/jetty/JettyReactiveWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/reactive/JettyReactiveWebServerFactoryTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.reactive.jetty; +package org.springframework.boot.jetty.reactive; import java.net.ConnectException; import java.net.InetAddress; @@ -31,12 +31,12 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.mockito.InOrder; +import org.springframework.boot.jetty.JettyAccess; +import org.springframework.boot.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.JettyWebServer; import org.springframework.boot.web.server.Shutdown; import org.springframework.boot.web.server.Ssl; import org.springframework.boot.web.server.Ssl.ServerNameSslBundle; -import org.springframework.boot.web.server.jetty.JettyAccess; -import org.springframework.boot.web.server.jetty.JettyServerCustomizer; -import org.springframework.boot.web.server.jetty.JettyWebServer; import org.springframework.boot.web.server.reactive.AbstractReactiveWebServerFactoryTests; import org.springframework.boot.web.server.reactive.ConfigurableReactiveWebServerFactory; import org.springframework.http.server.reactive.HttpHandler; diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/jetty/JettyServletWebServerFactoryTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/servlet/JettyServletWebServerFactoryTests.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/jetty/JettyServletWebServerFactoryTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/servlet/JettyServletWebServerFactoryTests.java index f68e1f9f534..e155e639e13 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/jetty/JettyServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/servlet/JettyServletWebServerFactoryTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; import java.lang.reflect.Method; import java.net.InetAddress; @@ -62,6 +62,9 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.mockito.InOrder; +import org.springframework.boot.jetty.JettyAccess; +import org.springframework.boot.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.JettyWebServer; import org.springframework.boot.testsupport.classpath.resources.ResourcePath; import org.springframework.boot.testsupport.classpath.resources.WithPackageResources; import org.springframework.boot.testsupport.system.CapturedOutput; @@ -72,9 +75,6 @@ import org.springframework.boot.web.server.Shutdown; import org.springframework.boot.web.server.Ssl; import org.springframework.boot.web.server.Ssl.ServerNameSslBundle; import org.springframework.boot.web.server.WebServerException; -import org.springframework.boot.web.server.jetty.JettyAccess; -import org.springframework.boot.web.server.jetty.JettyServerCustomizer; -import org.springframework.boot.web.server.jetty.JettyWebServer; import org.springframework.boot.web.server.servlet.AbstractServletWebServerFactoryTests; import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory; import org.springframework.util.ReflectionUtils; diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/jetty/LoaderHidingResourceTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/servlet/LoaderHidingResourceTests.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/jetty/LoaderHidingResourceTests.java rename to spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/servlet/LoaderHidingResourceTests.java index 7fb4fc6d999..2fcb8939d42 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/jetty/LoaderHidingResourceTests.java +++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/servlet/LoaderHidingResourceTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.jetty; +package org.springframework.boot.jetty.servlet; import java.io.File; import java.io.FileOutputStream; diff --git a/spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/jetty/test.jks b/spring-boot-project/spring-boot-jetty/src/test/resources/org/springframework/boot/jetty/servlet/test.jks similarity index 100% rename from spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/jetty/test.jks rename to spring-boot-project/spring-boot-jetty/src/test/resources/org/springframework/boot/jetty/servlet/test.jks diff --git a/spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/servlet/jetty/test.jks b/spring-boot-project/spring-boot-jetty/src/test/resources/org/springframework/boot/jetty/test.jks similarity index 100% rename from spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/servlet/jetty/test.jks rename to spring-boot-project/spring-boot-jetty/src/test/resources/org/springframework/boot/jetty/test.jks diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-jetty/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-jetty/build.gradle index c4470c94ca7..26c846f9c79 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-jetty/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-jetty/build.gradle @@ -21,12 +21,11 @@ plugins { description = "Starter for using Jetty as the embedded servlet container. An alternative to spring-boot-starter-tomcat" dependencies { + api(project(":spring-boot-project:spring-boot-jetty")) api("jakarta.servlet:jakarta.servlet-api") api("jakarta.websocket:jakarta.websocket-api") api("jakarta.websocket:jakarta.websocket-client-api") api("org.apache.tomcat.embed:tomcat-embed-el") - api("org.eclipse.jetty.ee10:jetty-ee10-servlets") - api("org.eclipse.jetty.ee10:jetty-ee10-webapp") api("org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jakarta-server") { exclude group: "jakarta.el", module: "jakarta.el-api" exclude group: "org.eclipse.jetty", module: "jetty-jndi" diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/spring-boot-server-tests-app/build.gradle b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/spring-boot-server-tests-app/build.gradle index 10536ef4370..aacd365c0bc 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/spring-boot-server-tests-app/build.gradle +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/spring-boot-server-tests-app/build.gradle @@ -66,8 +66,8 @@ tasks.register("resourcesJar", Jar) { jar -> } dependencies { - compileOnly("org.eclipse.jetty.ee10:jetty-ee10-servlet") compileOnly("org.springframework:spring-web") + compileOnly("org.springframework.boot:spring-boot-jetty") implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)) implementation("org.springframework.boot:spring-boot-starter") diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/spring-boot-server-tests-app/src/main/java/com/example/JettyServerCustomizerConfig.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/spring-boot-server-tests-app/src/main/java/com/example/JettyServerCustomizerConfig.java index 6385355c02c..b6d4104d592 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/spring-boot-server-tests-app/src/main/java/com/example/JettyServerCustomizerConfig.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/spring-boot-server-tests-app/src/main/java/com/example/JettyServerCustomizerConfig.java @@ -23,7 +23,7 @@ import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.handler.ContextHandler; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.boot.web.server.jetty.JettyServerCustomizer; +import org.springframework.boot.jetty.JettyServerCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-websocket-jetty/src/test/java/smoketest/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-websocket-jetty/src/test/java/smoketest/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java index 1fc1d7a37e7..374375a98f5 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-websocket-jetty/src/test/java/smoketest/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-websocket-jetty/src/test/java/smoketest/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java @@ -33,11 +33,11 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.boot.web.server.servlet.ServletWebServerFactory; -import org.springframework.boot.web.server.servlet.jetty.JettyServletWebServerFactory; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;