From 0a72db46761866261433d1c42742912478d24328 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 13 Mar 2025 14:35:24 +0000 Subject: [PATCH] Create spring-boot-undertow module --- settings.gradle | 1 + .../build.gradle | 1 + .../undertow/UndertowAccessLogCustomizer.java | 2 +- ...veManagementChildContextConfiguration.java | 4 +- ...iveManagementContextAutoConfiguration.java | 2 +- ...etManagementChildContextConfiguration.java | 2 +- ...letManagementContextAutoConfiguration.java | 2 +- .../spring-boot-actuator/build.gradle | 1 + .../DispatcherServletHandlerMappings.java | 8 +++- .../build.gradle | 1 + .../ServletWebServerMvcIntegrationTests.java | 2 +- .../resources/META-INF/spring/aot.factories | 3 +- .../build.gradle | 1 + ...itional-spring-configuration-metadata.json | 8 ---- ...ot.autoconfigure.AutoConfiguration.imports | 2 - .../MultipartAutoConfigurationTests.java | 2 +- .../spring-boot-dependencies/build.gradle | 3 +- .../spring-boot-docs/build.gradle | 3 ++ .../MyUndertowConfiguration.java | 2 +- .../MyUndertowConfiguration.kt | 4 +- .../spring-boot-starter-undertow/build.gradle | 2 +- .../spring-boot-undertow/build.gradle | 36 ++++++++++++++++++ .../undertow/AccessLogHttpHandlerFactory.java | 4 +- .../CompressionHttpHandlerFactory.java | 4 +- .../ConfigurableUndertowWebServerFactory.java | 2 +- .../boot}/undertow/HttpHandlerFactory.java | 4 +- .../boot}/undertow/SslBuilderCustomizer.java | 4 +- .../undertow/UndertowBuilderCustomizer.java | 4 +- .../boot}/undertow/UndertowWebServer.java | 2 +- .../undertow/UndertowWebServerFactory.java | 2 +- .../UndertowServerProperties.java | 2 +- .../UndertowWebServerConfiguration.java | 4 +- .../UndertowWebServerFactoryCustomizer.java | 6 +-- .../undertow/autoconfigure}/package-info.java | 2 +- ...towReactiveWebServerAutoConfiguration.java | 10 ++--- .../autoconfigure/reactive}/package-info.java | 2 +- ...rtowServletWebServerAutoConfiguration.java | 12 +++--- ...rtowServletWebServerFactoryCustomizer.java | 6 +-- ...rtowServletWebServerFactoryCustomizer.java | 6 +-- .../autoconfigure/servlet}/package-info.java | 2 +- .../boot}/undertow/package-info.java | 6 +-- .../UndertowReactiveWebServerFactory.java | 10 ++--- .../boot/undertow/reactive}/package-info.java | 2 +- .../servlet}/CompositeResourceManager.java | 2 +- .../DeploymentManagerHttpHandlerFactory.java | 4 +- .../servlet}/FileSessionPersistence.java | 2 +- .../undertow/servlet}/JarResourceManager.java | 2 +- .../UndertowDeploymentInfoCustomizer.java | 2 +- .../servlet}/UndertowServletWebServer.java | 6 +-- .../UndertowServletWebServerFactory.java | 6 +-- .../boot/undertow/servlet}/package-info.java | 2 +- .../META-INF/META-INF/spring.factories | 0 ...itional-spring-configuration-metadata.json | 13 +++++++ .../resources/META-INF/spring/aot.factories | 2 + ...ot.autoconfigure.AutoConfiguration.imports | 2 + .../boot}/undertow/UndertowAccess.java | 2 +- .../UndertowWebServerRuntimeHintsTests.java | 4 +- .../UndertowServerPropertiesTests.java | 2 +- ...dertowWebServerFactoryCustomizerTests.java | 6 +-- ...activeWebServerAutoConfigurationTests.java | 8 ++-- ...ervletWebServerAutoConfigurationTests.java | 9 ++--- ...ervletWebServerFactoryCustomizerTests.java | 6 +-- ...tWebServerServletContextListenerTests.java | 4 +- ...UndertowReactiveWebServerFactoryTests.java | 8 ++-- .../servlet}/FileSessionPersistenceTests.java | 2 +- .../servlet}/JarResourceManagerTests.java | 2 +- .../UndertowServletWebServerFactoryTests.java | 4 +- .../boot/undertow/servlet}/restricted.jks | Bin .../boot/undertow/servlet}/test.jks | Bin .../springframework/boot}/undertow/test.jks | Bin ...omContainerWebSocketsApplicationTests.java | 2 +- 71 files changed, 172 insertions(+), 118 deletions(-) create mode 100644 spring-boot-project/spring-boot-undertow/build.gradle rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-undertow/src/main/java/org/springframework/boot}/undertow/AccessLogHttpHandlerFactory.java (97%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-undertow/src/main/java/org/springframework/boot}/undertow/CompressionHttpHandlerFactory.java (97%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-undertow/src/main/java/org/springframework/boot}/undertow/ConfigurableUndertowWebServerFactory.java (98%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-undertow/src/main/java/org/springframework/boot}/undertow/HttpHandlerFactory.java (91%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-undertow/src/main/java/org/springframework/boot}/undertow/SslBuilderCustomizer.java (96%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-undertow/src/main/java/org/springframework/boot}/undertow/UndertowBuilderCustomizer.java (87%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-undertow/src/main/java/org/springframework/boot}/undertow/UndertowWebServer.java (99%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-undertow/src/main/java/org/springframework/boot}/undertow/UndertowWebServerFactory.java (99%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure}/UndertowServerProperties.java (99%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure}/UndertowWebServerConfiguration.java (92%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure}/UndertowWebServerFactoryCustomizer.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure}/package-info.java (91%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive}/UndertowReactiveWebServerAutoConfiguration.java (84%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive}/package-info.java (90%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet}/UndertowServletWebServerAutoConfiguration.java (86%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet}/UndertowServletWebServerFactoryCustomizer.java (85%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet}/WebSocketUndertowServletWebServerFactoryCustomizer.java (86%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet}/package-info.java (90%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server => spring-boot-undertow/src/main/java/org/springframework/boot}/undertow/package-info.java (74%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/reactive}/UndertowReactiveWebServerFactory.java (84%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/reactive}/package-info.java (91%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet}/CompositeResourceManager.java (97%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet}/DeploymentManagerHttpHandlerFactory.java (94%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet}/FileSessionPersistence.java (98%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet}/JarResourceManager.java (97%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet}/UndertowDeploymentInfoCustomizer.java (94%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet}/UndertowServletWebServer.java (93%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet}/UndertowServletWebServerFactory.java (99%) rename spring-boot-project/{spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet}/package-info.java (91%) create mode 100644 spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/META-INF/spring.factories create mode 100644 spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/additional-spring-configuration-metadata.json create mode 100644 spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/aot.factories create mode 100644 spring-boot-project/spring-boot-undertow/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-undertow/src/test/java/org/springframework/boot}/undertow/UndertowAccess.java (94%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server => spring-boot-undertow/src/test/java/org/springframework/boot}/undertow/UndertowWebServerRuntimeHintsTests.java (93%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure}/UndertowServerPropertiesTests.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure}/UndertowWebServerFactoryCustomizerTests.java (97%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/reactive}/UndertowReactiveWebServerAutoConfigurationTests.java (91%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet}/UndertowServletWebServerAutoConfigurationTests.java (93%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet}/UndertowServletWebServerFactoryCustomizerTests.java (87%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet}/UndertowServletWebServerServletContextListenerTests.java (89%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server/reactive/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/reactive}/UndertowReactiveWebServerFactoryTests.java (95%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet}/FileSessionPersistenceTests.java (98%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet}/JarResourceManagerTests.java (98%) rename spring-boot-project/{spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet}/UndertowServletWebServerFactoryTests.java (99%) rename spring-boot-project/{spring-boot-all/src/test/resources/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/test/resources/org/springframework/boot/undertow/servlet}/restricted.jks (100%) rename spring-boot-project/{spring-boot-all/src/test/resources/org/springframework/boot/web/server/servlet/undertow => spring-boot-undertow/src/test/resources/org/springframework/boot/undertow/servlet}/test.jks (100%) rename spring-boot-project/{spring-boot-all/src/test/resources/org/springframework/boot/web/server => spring-boot-undertow/src/test/resources/org/springframework/boot}/undertow/test.jks (100%) diff --git a/settings.gradle b/settings.gradle index 805536b3d7..ccc5e04472 100644 --- a/settings.gradle +++ b/settings.gradle @@ -71,6 +71,7 @@ include "spring-boot-project:spring-boot-tools:spring-boot-maven-plugin" include "spring-boot-project:spring-boot-tools:spring-boot-properties-migrator" include "spring-boot-project:spring-boot-tools:spring-boot-test-support" include "spring-boot-project:spring-boot-tools:spring-boot-test-support-docker" +include "spring-boot-project:spring-boot-undertow" include "spring-boot-system-tests:spring-boot-deployment-tests" include "spring-boot-system-tests:spring-boot-image-tests" include "spring-boot-tests:spring-boot-integration-tests:spring-boot-configuration-processor-tests" diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index f71e70805a..3b5ebdfdf0 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -18,6 +18,7 @@ dependencies { implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") optional(project(":spring-boot-project:spring-boot-tomcat")) + optional(project(":spring-boot-project:spring-boot-undertow")) optional("ch.qos.logback:logback-classic") optional("org.apache.cassandra:java-driver-core") { exclude group: "org.slf4j", module: "jcl-over-slf4j" diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowAccessLogCustomizer.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowAccessLogCustomizer.java index 9ac7c53ac0..371a4a6ce7 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowAccessLogCustomizer.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowAccessLogCustomizer.java @@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.web.server.undertow; import java.util.function.Function; import org.springframework.boot.actuate.autoconfigure.web.server.AccessLogCustomizer; -import org.springframework.boot.web.server.undertow.ConfigurableUndertowWebServerFactory; +import org.springframework.boot.undertow.ConfigurableUndertowWebServerFactory; /** * {@link AccessLogCustomizer} for Undertow. diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementChildContextConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementChildContextConfiguration.java index c8190b54f6..fc4e4f42ae 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementChildContextConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementChildContextConfiguration.java @@ -25,10 +25,10 @@ import org.springframework.boot.actuate.autoconfigure.web.ManagementContextType; 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.undertow.UndertowReactiveWebServerAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.undertow.autoconfigure.reactive.UndertowReactiveWebServerAutoConfiguration; +import org.springframework.boot.undertow.reactive.UndertowReactiveWebServerFactory; import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory; -import org.springframework.boot.web.server.reactive.undertow.UndertowReactiveWebServerFactory; 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/undertow/UndertowReactiveManagementContextAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementContextAutoConfiguration.java index c934266825..68fac3e212 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementContextAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementContextAutoConfiguration.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.undertow.UndertowReactiveWebServerAutoConfiguration; +import org.springframework.boot.undertow.autoconfigure.reactive.UndertowReactiveWebServerAutoConfiguration; 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/undertow/UndertowServletManagementChildContextConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementChildContextConfiguration.java index 20d922622c..da28b0af3e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementChildContextConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementChildContextConfiguration.java @@ -24,7 +24,7 @@ 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.context.properties.EnableConfigurationProperties; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; 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/undertow/UndertowServletManagementContextAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementContextAutoConfiguration.java index 46ded30f64..a5cc154f31 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementContextAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementContextAutoConfiguration.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.undertow.UndertowServletWebServerAutoConfiguration; +import org.springframework.boot.undertow.autoconfigure.servlet.UndertowServletWebServerAutoConfiguration; import org.springframework.boot.web.server.servlet.ServletWebServerFactory; 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 530e83588a..05e0924564 100644 --- a/spring-boot-project/spring-boot-actuator/build.gradle +++ b/spring-boot-project/spring-boot-actuator/build.gradle @@ -24,6 +24,7 @@ dependencies { dockerTestImplementation("org.testcontainers:testcontainers") optional(project(":spring-boot-project:spring-boot-tomcat")) + optional(project(":spring-boot-project:spring-boot-undertow")) optional("org.apache.cassandra:java-driver-core") { exclude group: "org.slf4j", module: "jcl-over-slf4j" } diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletHandlerMappings.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletHandlerMappings.java index 2029d414ac..d0289719f9 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletHandlerMappings.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/DispatcherServletHandlerMappings.java @@ -27,8 +27,8 @@ import org.apache.catalina.Context; import org.apache.catalina.core.StandardWrapper; import org.springframework.boot.tomcat.TomcatWebServer; +import org.springframework.boot.undertow.servlet.UndertowServletWebServer; import org.springframework.boot.web.server.WebServer; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServer; import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext; import org.springframework.util.ClassUtils; import org.springframework.web.context.WebApplicationContext; @@ -47,6 +47,10 @@ final class DispatcherServletHandlerMappings { private static final boolean TOMCAT_WEB_SERVER_PRESENT = ClassUtils.isPresent( "org.springframework.boot.tomcat.TomcatWebServer", DispatcherServletHandlerMappings.class.getClassLoader()); + private static final boolean UNDERTOW_WEB_SERVER_PRESENT = ClassUtils.isPresent( + "org.springframework.boot.undertow.UndertowWebServer", + DispatcherServletHandlerMappings.class.getClassLoader()); + private final String name; private final DispatcherServlet dispatcherServlet; @@ -74,7 +78,7 @@ final class DispatcherServletHandlerMappings { return; } WebServer webServer = webServerApplicationContext.getWebServer(); - if (webServer instanceof UndertowServletWebServer undertowServletWebServer) { + if (UNDERTOW_WEB_SERVER_PRESENT && webServer instanceof UndertowServletWebServer undertowServletWebServer) { new UndertowServletInitializer(undertowServletWebServer).initializeServlet(this.name); } else if (TOMCAT_WEB_SERVER_PRESENT && webServer instanceof TomcatWebServer tomcatWebServer) { 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 31d643c94a..1ba57f50e3 100644 --- a/spring-boot-project/spring-boot-all-integration-tests/build.gradle +++ b/spring-boot-project/spring-boot-all-integration-tests/build.gradle @@ -8,6 +8,7 @@ dependencies { testImplementation(project(":spring-boot-project:spring-boot-all")) 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")) testImplementation("io.projectreactor.netty:reactor-netty-http") testImplementation("org.apache.httpcomponents.client5:httpclient5") testImplementation("org.apache.httpcomponents.core5:httpcore5-reactive") 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 e29d8c86ba..442c354505 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 @@ -24,10 +24,10 @@ import org.junit.jupiter.api.Test; 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.server.servlet.undertow.UndertowServletWebServerFactory; 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/src/main/resources/META-INF/spring/aot.factories b/spring-boot-project/spring-boot-all/src/main/resources/META-INF/spring/aot.factories index cbdce6b6d9..18d106b913 100644 --- a/spring-boot-project/spring-boot-all/src/main/resources/META-INF/spring/aot.factories +++ b/spring-boot-project/spring-boot-all/src/main/resources/META-INF/spring/aot.factories @@ -1,7 +1,6 @@ org.springframework.aot.hint.RuntimeHintsRegistrar=\ org.springframework.boot.http.client.ClientHttpRequestFactoryRuntimeHints,\ -org.springframework.boot.jdbc.DataSourceBuilderRuntimeHints,\ -org.springframework.boot.web.server.undertow.UndertowWebServer$UndertowWebServerRuntimeHints +org.springframework.boot.jdbc.DataSourceBuilderRuntimeHints org.springframework.beans.factory.aot.BeanFactoryInitializationAotProcessor=\ org.springframework.boot.jackson.JsonComponentModule$JsonComponentBeanFactoryInitializationAotProcessor diff --git a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle index 200e4fe6e0..26a02fef3a 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle @@ -219,6 +219,7 @@ dependencies { 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")) testImplementation(testFixtures(project(":spring-boot-project:spring-boot"))) testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure"))) testImplementation("ch.qos.logback:logback-classic") 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 e8a610f265..98cc207b2c 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 @@ -65,14 +65,6 @@ "level": "error" } }, - { - "name": "server.undertow.buffers-per-region", - "type": "java.lang.Integer", - "description": "Number of buffer per region.", - "deprecation": { - "level": "error" - } - }, { "name": "spring.activemq.pool.create-connection-on-startup", "type": "java.lang.Boolean", 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 8c43d7e90c..0162d9d435 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 @@ -134,9 +134,7 @@ org.springframework.boot.autoconfigure.web.reactive.function.client.ClientHttpCo 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.reactive.undertow.UndertowReactiveWebServerAutoConfiguration org.springframework.boot.autoconfigure.web.server.servlet.jetty.JettyServletWebServerAutoConfiguration -org.springframework.boot.autoconfigure.web.server.servlet.undertow.UndertowServletWebServerAutoConfiguration 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 b45bdda9fd..9b24505d3a 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 @@ -33,8 +33,8 @@ 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.server.servlet.undertow.UndertowServletWebServerFactory; 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 d78d5d83ad..e0cede0753 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -2046,7 +2046,8 @@ bom { "spring-boot-test", "spring-boot-test-autoconfigure", "spring-boot-testcontainers", - "spring-boot-tomcat" + "spring-boot-tomcat", + "spring-boot-undertow" ] plugins = [ "spring-boot-maven-plugin" diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index d6525f507d..1f7fb32777 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -65,6 +65,7 @@ dependencies { autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", 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")) configurationProperties(project(path: ":spring-boot-project:spring-boot", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-actuator", configuration: "configurationPropertiesMetadata")) @@ -76,6 +77,7 @@ dependencies { 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")) + configurationProperties(project(path: ":spring-boot-project:spring-boot-undertow", configuration: "configurationPropertiesMetadata")) dokkatoo(project(path: ":spring-boot-project:spring-boot-all")) dokkatoo(project(path: ":spring-boot-project:spring-boot-test")) @@ -91,6 +93,7 @@ dependencies { implementation(project(path: ":spring-boot-project:spring-boot-tomcat")) implementation(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-cli")) implementation(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-loader-tools")) + implementation(project(path: ":spring-boot-project:spring-boot-undertow")) implementation("ch.qos.logback:logback-classic") implementation("com.redis:testcontainers-redis") implementation("com.zaxxer:HikariCP") diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/howto/webserver/enablemultiplelistenersinundertow/MyUndertowConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/howto/webserver/enablemultiplelistenersinundertow/MyUndertowConfiguration.java index e7da31eb0b..2ad7438955 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/howto/webserver/enablemultiplelistenersinundertow/MyUndertowConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/howto/webserver/enablemultiplelistenersinundertow/MyUndertowConfiguration.java @@ -18,8 +18,8 @@ package org.springframework.boot.docs.howto.webserver.enablemultiplelistenersinu import io.undertow.Undertow.Builder; +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/howto/webserver/enablemultiplelistenersinundertow/MyUndertowConfiguration.kt b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/howto/webserver/enablemultiplelistenersinundertow/MyUndertowConfiguration.kt index 66dd04acd1..a490c46ce6 100644 --- a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/howto/webserver/enablemultiplelistenersinundertow/MyUndertowConfiguration.kt +++ b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/howto/webserver/enablemultiplelistenersinundertow/MyUndertowConfiguration.kt @@ -18,8 +18,8 @@ package org.springframework.boot.docs.howto.webserver.enablemultiplelistenersinu import io.undertow.Undertow import org.springframework.boot.web.server.WebServerFactoryCustomizer -import org.springframework.boot.web.server.undertow.UndertowBuilderCustomizer -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory +import org.springframework.boot.undertow.UndertowBuilderCustomizer +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-undertow/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-undertow/build.gradle index 1d3d6298bd..64e2a0e7ab 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-undertow/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-undertow/build.gradle @@ -5,7 +5,7 @@ plugins { description = "Starter for using Undertow as the embedded servlet container. An alternative to spring-boot-starter-tomcat" dependencies { - api("io.undertow:undertow-core") + api(project(":spring-boot-project:spring-boot-undertow")) api("io.undertow:undertow-servlet") api("io.undertow:undertow-websockets-jsr") api("org.apache.tomcat.embed:tomcat-embed-el") diff --git a/spring-boot-project/spring-boot-undertow/build.gradle b/spring-boot-project/spring-boot-undertow/build.gradle new file mode 100644 index 0000000000..8d0828026c --- /dev/null +++ b/spring-boot-project/spring-boot-undertow/build.gradle @@ -0,0 +1,36 @@ +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 Undertow" + +dependencies { + api(project(":spring-boot-project:spring-boot")) + api("io.undertow:undertow-servlet") + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional("io.undertow:undertow-websockets-jsr") + 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") + testImplementation("org.apache.tomcat.embed:tomcat-embed-jasper") + + 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/undertow/AccessLogHttpHandlerFactory.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/AccessLogHttpHandlerFactory.java similarity index 97% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/AccessLogHttpHandlerFactory.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/AccessLogHttpHandlerFactory.java index f524787348..a3f9e3fb24 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/AccessLogHttpHandlerFactory.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/AccessLogHttpHandlerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; import java.io.Closeable; import java.io.File; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/CompressionHttpHandlerFactory.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/CompressionHttpHandlerFactory.java similarity index 97% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/CompressionHttpHandlerFactory.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/CompressionHttpHandlerFactory.java index 09acf1bb7b..95664b69ca 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/CompressionHttpHandlerFactory.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/CompressionHttpHandlerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; import java.util.ArrayList; import java.util.List; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/ConfigurableUndertowWebServerFactory.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/ConfigurableUndertowWebServerFactory.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/ConfigurableUndertowWebServerFactory.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/ConfigurableUndertowWebServerFactory.java index 9c51a8b057..4cae11479b 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/ConfigurableUndertowWebServerFactory.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/ConfigurableUndertowWebServerFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; import java.io.File; import java.util.Collection; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/HttpHandlerFactory.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/HttpHandlerFactory.java similarity index 91% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/HttpHandlerFactory.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/HttpHandlerFactory.java index c537e5e5b5..992ae2a8f4 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/HttpHandlerFactory.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/HttpHandlerFactory.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; import java.io.Closeable; import io.undertow.server.HttpHandler; import io.undertow.server.handlers.GracefulShutdownHandler; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServer; +import org.springframework.boot.undertow.servlet.UndertowServletWebServer; /** * Factory used by {@link UndertowServletWebServer} to add {@link HttpHandler diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/SslBuilderCustomizer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/SslBuilderCustomizer.java similarity index 96% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/SslBuilderCustomizer.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/SslBuilderCustomizer.java index 29f776233a..bb0f841d5e 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/SslBuilderCustomizer.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/SslBuilderCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; import java.net.InetAddress; import java.util.Map; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/UndertowBuilderCustomizer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/UndertowBuilderCustomizer.java similarity index 87% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/UndertowBuilderCustomizer.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/UndertowBuilderCustomizer.java index 4830171aa5..2cd2c3b35f 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/UndertowBuilderCustomizer.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/UndertowBuilderCustomizer.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; import io.undertow.Undertow.Builder; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; /** * Callback interface that can be used to customize an Undertow {@link Builder}. diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/UndertowWebServer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/UndertowWebServer.java similarity index 99% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/UndertowWebServer.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/UndertowWebServer.java index 06b5797a89..716648ab12 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/UndertowWebServer.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/UndertowWebServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; import java.io.Closeable; import java.io.IOException; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/UndertowWebServerFactory.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/UndertowWebServerFactory.java similarity index 99% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/UndertowWebServerFactory.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/UndertowWebServerFactory.java index 4ab7a2fed2..4cdaf312a3 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/UndertowWebServerFactory.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/UndertowWebServerFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; import java.io.File; import java.net.InetAddress; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowServerProperties.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowServerProperties.java similarity index 99% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowServerProperties.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowServerProperties.java index 17c35266ea..77c6084351 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowServerProperties.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowServerProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.autoconfigure; import java.io.File; import java.nio.charset.Charset; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowWebServerConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerConfiguration.java similarity index 92% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowWebServerConfiguration.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerConfiguration.java index 054207d286..392929a849 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowWebServerConfiguration.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerConfiguration.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.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.web.server.servlet.undertow.UndertowDeploymentInfoCustomizer; +import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer; 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/undertow/UndertowWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizer.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowWebServerFactoryCustomizer.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizer.java index 4cd77a9ee1..ecf4e06df0 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.autoconfigure; import java.lang.reflect.Modifier; import java.nio.charset.Charset; @@ -30,11 +30,11 @@ import org.xnio.Option; import org.xnio.Options; import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.autoconfigure.web.server.undertow.UndertowServerProperties.Accesslog; import org.springframework.boot.cloud.CloudPlatform; import org.springframework.boot.context.properties.PropertyMapper; +import org.springframework.boot.undertow.ConfigurableUndertowWebServerFactory; +import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties.Accesslog; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.undertow.ConfigurableUndertowWebServerFactory; import org.springframework.core.Ordered; import org.springframework.core.env.Environment; import org.springframework.util.Assert; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/package-info.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/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/undertow/package-info.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/package-info.java index 6c0d44dfbe..951feb4784 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/undertow/package-info.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/package-info.java @@ -18,4 +18,4 @@ * Classes related to the auto-configuration of a servlet or reactive web server using * Undertow. */ -package org.springframework.boot.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.autoconfigure; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow/UndertowReactiveWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfiguration.java similarity index 84% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow/UndertowReactiveWebServerAutoConfiguration.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfiguration.java index 35eb5564be..a5aa7c2660 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow/UndertowReactiveWebServerAutoConfiguration.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.reactive.undertow; +package org.springframework.boot.undertow.autoconfigure.reactive; import io.undertow.Undertow; @@ -25,12 +25,12 @@ 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.reactive.ReactiveWebServerConfiguration; -import org.springframework.boot.autoconfigure.web.server.undertow.UndertowServerProperties; -import org.springframework.boot.autoconfigure.web.server.undertow.UndertowWebServerConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.undertow.UndertowBuilderCustomizer; +import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties; +import org.springframework.boot.undertow.autoconfigure.UndertowWebServerConfiguration; +import org.springframework.boot.undertow.reactive.UndertowReactiveWebServerFactory; import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory; -import org.springframework.boot.web.server.reactive.undertow.UndertowReactiveWebServerFactory; -import org.springframework.boot.web.server.undertow.UndertowBuilderCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; import org.springframework.http.ReactiveHttpInputMessage; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow/package-info.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/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/undertow/package-info.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive/package-info.java index 09798d5700..640e7e6669 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow/package-info.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive/package-info.java @@ -17,4 +17,4 @@ /** * Classes related to the auto-configuration of a reactive web server using Undertow. */ -package org.springframework.boot.autoconfigure.web.server.reactive.undertow; +package org.springframework.boot.undertow.autoconfigure.reactive; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfiguration.java similarity index 86% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerAutoConfiguration.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfiguration.java index 4465d1ee40..1920790229 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerAutoConfiguration.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.undertow; +package org.springframework.boot.undertow.autoconfigure.servlet; import io.undertow.Undertow; import io.undertow.websockets.jsr.Bootstrap; @@ -30,13 +30,13 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.condition.SearchStrategy; import org.springframework.boot.autoconfigure.web.server.servlet.ServletWebServerConfiguration; -import org.springframework.boot.autoconfigure.web.server.undertow.UndertowServerProperties; -import org.springframework.boot.autoconfigure.web.server.undertow.UndertowWebServerConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.undertow.UndertowBuilderCustomizer; +import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties; +import org.springframework.boot.undertow.autoconfigure.UndertowWebServerConfiguration; +import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer; +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.web.server.servlet.ServletWebServerFactory; -import org.springframework.boot.web.server.servlet.undertow.UndertowDeploymentInfoCustomizer; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; -import org.springframework.boot.web.server.undertow.UndertowBuilderCustomizer; 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/undertow/UndertowServletWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizer.java similarity index 85% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerFactoryCustomizer.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizer.java index f5d88927b5..3072f3998e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizer.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.undertow; +package org.springframework.boot.undertow.autoconfigure.servlet; import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.autoconfigure.web.server.undertow.UndertowServerProperties; +import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties; +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; /** * {@link WebServerFactoryCustomizer} to apply {@link ServerProperties} to Undertow diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/WebSocketUndertowServletWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/WebSocketUndertowServletWebServerFactoryCustomizer.java similarity index 86% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/WebSocketUndertowServletWebServerFactoryCustomizer.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/WebSocketUndertowServletWebServerFactoryCustomizer.java index 3df409895d..bda533388c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/WebSocketUndertowServletWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/WebSocketUndertowServletWebServerFactoryCustomizer.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.undertow; +package org.springframework.boot.undertow.autoconfigure.servlet; import io.undertow.servlet.api.DeploymentInfo; import io.undertow.websockets.jsr.WebSocketDeploymentInfo; +import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer; +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.servlet.undertow.UndertowDeploymentInfoCustomizer; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; 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/undertow/package-info.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/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/undertow/package-info.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/package-info.java index b35799adef..004cf66f33 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/package-info.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/package-info.java @@ -17,4 +17,4 @@ /** * Classes related to the auto-configuration of a servlet web server using Undertow. */ -package org.springframework.boot.autoconfigure.web.server.servlet.undertow; +package org.springframework.boot.undertow.autoconfigure.servlet; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/package-info.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/package-info.java similarity index 74% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/package-info.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/package-info.java index 98d71eff82..5fe32675d4 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/undertow/package-info.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/package-info.java @@ -17,7 +17,7 @@ /** * Reactive and servlet web server implementations backed by Undertow. * - * @see org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory - * @see org.springframework.boot.web.server.reactive.undertow.UndertowReactiveWebServerFactory + * @see org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory + * @see org.springframework.boot.undertow.reactive.UndertowReactiveWebServerFactory */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/undertow/UndertowReactiveWebServerFactory.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/reactive/UndertowReactiveWebServerFactory.java similarity index 84% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/undertow/UndertowReactiveWebServerFactory.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/reactive/UndertowReactiveWebServerFactory.java index ff8ca05118..b664e6420d 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/undertow/UndertowReactiveWebServerFactory.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/reactive/UndertowReactiveWebServerFactory.java @@ -14,19 +14,19 @@ * limitations under the License. */ -package org.springframework.boot.web.server.reactive.undertow; +package org.springframework.boot.undertow.reactive; import java.util.List; import io.undertow.Undertow; +import org.springframework.boot.undertow.ConfigurableUndertowWebServerFactory; +import org.springframework.boot.undertow.HttpHandlerFactory; +import org.springframework.boot.undertow.UndertowWebServer; +import org.springframework.boot.undertow.UndertowWebServerFactory; import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.server.reactive.ConfigurableReactiveWebServerFactory; import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory; -import org.springframework.boot.web.server.undertow.ConfigurableUndertowWebServerFactory; -import org.springframework.boot.web.server.undertow.HttpHandlerFactory; -import org.springframework.boot.web.server.undertow.UndertowWebServer; -import org.springframework.boot.web.server.undertow.UndertowWebServerFactory; import org.springframework.http.server.reactive.UndertowHttpHandlerAdapter; /** diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/undertow/package-info.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/reactive/package-info.java similarity index 91% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/undertow/package-info.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/reactive/package-info.java index 4f040dbcb8..896786afeb 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/reactive/undertow/package-info.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/reactive/package-info.java @@ -17,4 +17,4 @@ /** * Reactive web server implementation backed by Undertow. */ -package org.springframework.boot.web.server.reactive.undertow; +package org.springframework.boot.undertow.reactive; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/CompositeResourceManager.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/CompositeResourceManager.java similarity index 97% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/CompositeResourceManager.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/CompositeResourceManager.java index efe0acc461..bafa2f5626 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/CompositeResourceManager.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/CompositeResourceManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import java.io.IOException; import java.util.Arrays; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/DeploymentManagerHttpHandlerFactory.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/DeploymentManagerHttpHandlerFactory.java similarity index 94% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/DeploymentManagerHttpHandlerFactory.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/DeploymentManagerHttpHandlerFactory.java index 093a967b66..d0344034a6 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/DeploymentManagerHttpHandlerFactory.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/DeploymentManagerHttpHandlerFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import java.io.Closeable; import java.io.IOException; @@ -24,7 +24,7 @@ import io.undertow.server.HttpServerExchange; import io.undertow.servlet.api.DeploymentManager; import jakarta.servlet.ServletException; -import org.springframework.boot.web.server.undertow.HttpHandlerFactory; +import org.springframework.boot.undertow.HttpHandlerFactory; import org.springframework.util.Assert; /** diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/FileSessionPersistence.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/FileSessionPersistence.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/FileSessionPersistence.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/FileSessionPersistence.java index 65df58dc02..19db6716a8 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/FileSessionPersistence.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/FileSessionPersistence.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import java.io.File; import java.io.FileInputStream; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/JarResourceManager.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/JarResourceManager.java similarity index 97% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/JarResourceManager.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/JarResourceManager.java index a95b1dd4f8..5e95cd8830 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/JarResourceManager.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/JarResourceManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import java.io.File; import java.io.IOException; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/UndertowDeploymentInfoCustomizer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/UndertowDeploymentInfoCustomizer.java similarity index 94% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/UndertowDeploymentInfoCustomizer.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/UndertowDeploymentInfoCustomizer.java index 6034e4b743..03737eaf99 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/UndertowDeploymentInfoCustomizer.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/UndertowDeploymentInfoCustomizer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import io.undertow.servlet.api.DeploymentInfo; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/UndertowServletWebServer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/UndertowServletWebServer.java similarity index 93% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/UndertowServletWebServer.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/UndertowServletWebServer.java index 880002c28f..eb6e2f2938 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/UndertowServletWebServer.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/UndertowServletWebServer.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import io.undertow.Handlers; import io.undertow.Undertow.Builder; import io.undertow.server.HttpHandler; import io.undertow.servlet.api.DeploymentManager; +import org.springframework.boot.undertow.HttpHandlerFactory; +import org.springframework.boot.undertow.UndertowWebServer; import org.springframework.boot.web.server.WebServer; -import org.springframework.boot.web.server.undertow.HttpHandlerFactory; -import org.springframework.boot.web.server.undertow.UndertowWebServer; import org.springframework.util.StringUtils; /** diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/UndertowServletWebServerFactory.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/UndertowServletWebServerFactory.java similarity index 99% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/UndertowServletWebServerFactory.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/UndertowServletWebServerFactory.java index a2d28079bc..6b42384030 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/UndertowServletWebServerFactory.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/UndertowServletWebServerFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import java.io.File; import java.io.IOException; @@ -63,6 +63,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.boot.context.properties.PropertyMapper; +import org.springframework.boot.undertow.HttpHandlerFactory; +import org.springframework.boot.undertow.UndertowWebServerFactory; import org.springframework.boot.web.server.Cookie.SameSite; import org.springframework.boot.web.server.ErrorPage; import org.springframework.boot.web.server.MimeMappings.Mapping; @@ -75,8 +77,6 @@ import org.springframework.boot.web.server.servlet.ServletContextInitializer; import org.springframework.boot.web.server.servlet.ServletContextInitializers; import org.springframework.boot.web.server.servlet.ServletWebServerFactory; import org.springframework.boot.web.server.servlet.ServletWebServerSettings; -import org.springframework.boot.web.server.undertow.HttpHandlerFactory; -import org.springframework.boot.web.server.undertow.UndertowWebServerFactory; import org.springframework.context.ResourceLoaderAware; import org.springframework.core.io.ResourceLoader; import org.springframework.util.Assert; diff --git a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/package-info.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/package-info.java similarity index 91% rename from spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/package-info.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/package-info.java index da13c4359b..ceaf357263 100644 --- a/spring-boot-project/spring-boot-all/src/main/java/org/springframework/boot/web/server/servlet/undertow/package-info.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/servlet/package-info.java @@ -17,4 +17,4 @@ /** * Servlet web server implementation backed by Undertow. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; diff --git a/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/META-INF/spring.factories b/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/META-INF/spring.factories new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000000..507df41919 --- /dev/null +++ b/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,13 @@ +{ + "groups": [], + "properties": [ + { + "name": "server.undertow.buffers-per-region", + "type": "java.lang.Integer", + "description": "Number of buffer per region.", + "deprecation": { + "level": "error" + } + } + ] +} diff --git a/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/aot.factories b/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/aot.factories new file mode 100644 index 0000000000..ae1653d5ff --- /dev/null +++ b/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/aot.factories @@ -0,0 +1,2 @@ +org.springframework.aot.hint.RuntimeHintsRegistrar=\ +org.springframework.boot.undertow.UndertowWebServer$UndertowWebServerRuntimeHints diff --git a/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000000..bc124b9ddf --- /dev/null +++ b/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,2 @@ +org.springframework.boot.undertow.autoconfigure.reactive.UndertowReactiveWebServerAutoConfiguration +org.springframework.boot.undertow.autoconfigure.servlet.UndertowServletWebServerAutoConfiguration diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/undertow/UndertowAccess.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/UndertowAccess.java similarity index 94% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/undertow/UndertowAccess.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/UndertowAccess.java index c69ba937bb..c939856fce 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/undertow/UndertowAccess.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/UndertowAccess.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; /** * 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/undertow/UndertowWebServerRuntimeHintsTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/UndertowWebServerRuntimeHintsTests.java similarity index 93% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/undertow/UndertowWebServerRuntimeHintsTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/UndertowWebServerRuntimeHintsTests.java index ee62189215..8066d4df79 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/undertow/UndertowWebServerRuntimeHintsTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/UndertowWebServerRuntimeHintsTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.undertow; +package org.springframework.boot.undertow; import java.util.function.Predicate; @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; -import org.springframework.boot.web.server.undertow.UndertowWebServer.UndertowWebServerRuntimeHints; +import org.springframework.boot.undertow.UndertowWebServer.UndertowWebServerRuntimeHints; import org.springframework.util.ReflectionUtils; 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/undertow/UndertowServerPropertiesTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowServerPropertiesTests.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowServerPropertiesTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowServerPropertiesTests.java index acb1485d9c..82a7515bb0 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowServerPropertiesTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowServerPropertiesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.autoconfigure; import java.util.Collections; import java.util.Map; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizerTests.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowWebServerFactoryCustomizerTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizerTests.java index 0a7cf85c50..19e57065d0 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/undertow/UndertowWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.autoconfigure; import java.io.File; import java.nio.charset.StandardCharsets; @@ -33,8 +33,8 @@ import org.springframework.boot.autoconfigure.web.ServerProperties; 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.undertow.ConfigurableUndertowWebServerFactory; -import org.springframework.boot.web.server.undertow.UndertowBuilderCustomizer; +import org.springframework.boot.undertow.ConfigurableUndertowWebServerFactory; +import org.springframework.boot.undertow.UndertowBuilderCustomizer; 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/undertow/UndertowReactiveWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfigurationTests.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow/UndertowReactiveWebServerAutoConfigurationTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfigurationTests.java index 37584f23e4..387db243c3 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/undertow/UndertowReactiveWebServerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfigurationTests.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.reactive.undertow; +package org.springframework.boot.undertow.autoconfigure.reactive; import io.undertow.Undertow.Builder; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.web.server.reactive.AbstractReactiveWebServerAutoConfigurationTests; +import org.springframework.boot.undertow.UndertowBuilderCustomizer; +import org.springframework.boot.undertow.reactive.UndertowReactiveWebServerFactory; +import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.reactive.undertow.UndertowReactiveWebServerFactory; -import org.springframework.boot.web.server.servlet.undertow.UndertowDeploymentInfoCustomizer; -import org.springframework.boot.web.server.undertow.UndertowBuilderCustomizer; 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/undertow/UndertowServletWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfigurationTests.java similarity index 93% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerAutoConfigurationTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfigurationTests.java index e523b93f5c..5974b43e28 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.undertow; +package org.springframework.boot.undertow.autoconfigure.servlet; import io.undertow.Undertow.Builder; import io.undertow.servlet.api.DeploymentInfo; @@ -22,10 +22,10 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.web.server.servlet.AbstractServletWebServerAutoConfigurationTests; +import org.springframework.boot.undertow.UndertowBuilderCustomizer; +import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer; +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.server.servlet.undertow.UndertowDeploymentInfoCustomizer; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; -import org.springframework.boot.web.server.undertow.UndertowBuilderCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -43,7 +43,6 @@ import static org.mockito.Mockito.mock; * @author Raheela Aslam * @author Madhura Bhave */ -// @DirtiesUrlFactories class UndertowServletWebServerAutoConfigurationTests extends AbstractServletWebServerAutoConfigurationTests { UndertowServletWebServerAutoConfigurationTests() { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizerTests.java similarity index 87% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerFactoryCustomizerTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizerTests.java index e9aa85a4ea..4111ca7048 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizerTests.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.undertow; +package org.springframework.boot.undertow.autoconfigure.servlet; import org.junit.jupiter.api.Test; -import org.springframework.boot.autoconfigure.web.server.undertow.UndertowServerProperties; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; +import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties; +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; 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/servlet/undertow/UndertowServletWebServerServletContextListenerTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerServletContextListenerTests.java similarity index 89% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerServletContextListenerTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerServletContextListenerTests.java index ceb9a3105d..f88f86c070 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/undertow/UndertowServletWebServerServletContextListenerTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerServletContextListenerTests.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.web.server.servlet.undertow; +package org.springframework.boot.undertow.autoconfigure.servlet; import jakarta.servlet.ServletContextListener; +import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.web.server.servlet.AbstractServletWebServerServletContextListenerTests; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; 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/undertow/UndertowReactiveWebServerFactoryTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/reactive/UndertowReactiveWebServerFactoryTests.java similarity index 95% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/reactive/undertow/UndertowReactiveWebServerFactoryTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/reactive/UndertowReactiveWebServerFactoryTests.java index 832b6f7825..4f1985de98 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/reactive/undertow/UndertowReactiveWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/reactive/UndertowReactiveWebServerFactoryTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.reactive.undertow; +package org.springframework.boot.undertow.reactive; import java.io.File; import java.time.Duration; @@ -27,12 +27,12 @@ import org.junit.jupiter.api.io.TempDir; import org.mockito.InOrder; import reactor.core.publisher.Mono; +import org.springframework.boot.undertow.UndertowAccess; +import org.springframework.boot.undertow.UndertowBuilderCustomizer; +import org.springframework.boot.undertow.UndertowWebServer; import org.springframework.boot.web.server.Shutdown; import org.springframework.boot.web.server.reactive.AbstractReactiveWebServerFactoryTests; import org.springframework.boot.web.server.reactive.ConfigurableReactiveWebServerFactory; -import org.springframework.boot.web.server.undertow.UndertowAccess; -import org.springframework.boot.web.server.undertow.UndertowBuilderCustomizer; -import org.springframework.boot.web.server.undertow.UndertowWebServer; import org.springframework.http.MediaType; import org.springframework.http.server.reactive.HttpHandler; import org.springframework.web.reactive.function.BodyInserters; diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow/FileSessionPersistenceTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet/FileSessionPersistenceTests.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow/FileSessionPersistenceTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet/FileSessionPersistenceTests.java index 568c84bc95..73176a3f61 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow/FileSessionPersistenceTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet/FileSessionPersistenceTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import java.io.File; import java.util.Date; diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow/JarResourceManagerTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet/JarResourceManagerTests.java similarity index 98% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow/JarResourceManagerTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet/JarResourceManagerTests.java index 321efe2440..7a68eef4c5 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow/JarResourceManagerTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet/JarResourceManagerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import java.io.File; import java.io.FileOutputStream; diff --git a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow/UndertowServletWebServerFactoryTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet/UndertowServletWebServerFactoryTests.java similarity index 99% rename from spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow/UndertowServletWebServerFactoryTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet/UndertowServletWebServerFactoryTests.java index b74127f693..d8d78d186c 100644 --- a/spring-boot-project/spring-boot-all/src/test/java/org/springframework/boot/web/server/servlet/undertow/UndertowServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/servlet/UndertowServletWebServerFactoryTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web.server.servlet.undertow; +package org.springframework.boot.undertow.servlet; import java.io.File; import java.io.IOException; @@ -50,13 +50,13 @@ import org.mockito.InOrder; import org.springframework.boot.testsupport.classpath.resources.WithPackageResources; import org.springframework.boot.testsupport.web.servlet.ExampleServlet; +import org.springframework.boot.undertow.UndertowBuilderCustomizer; import org.springframework.boot.web.server.ErrorPage; import org.springframework.boot.web.server.GracefulShutdownResult; import org.springframework.boot.web.server.PortInUseException; import org.springframework.boot.web.server.Shutdown; import org.springframework.boot.web.server.servlet.AbstractServletWebServerFactoryTests; import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory; -import org.springframework.boot.web.server.undertow.UndertowBuilderCustomizer; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.http.HttpStatus; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; diff --git a/spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/servlet/undertow/restricted.jks b/spring-boot-project/spring-boot-undertow/src/test/resources/org/springframework/boot/undertow/servlet/restricted.jks similarity index 100% rename from spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/servlet/undertow/restricted.jks rename to spring-boot-project/spring-boot-undertow/src/test/resources/org/springframework/boot/undertow/servlet/restricted.jks diff --git a/spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/servlet/undertow/test.jks b/spring-boot-project/spring-boot-undertow/src/test/resources/org/springframework/boot/undertow/servlet/test.jks similarity index 100% rename from spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/servlet/undertow/test.jks rename to spring-boot-project/spring-boot-undertow/src/test/resources/org/springframework/boot/undertow/servlet/test.jks diff --git a/spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/undertow/test.jks b/spring-boot-project/spring-boot-undertow/src/test/resources/org/springframework/boot/undertow/test.jks similarity index 100% rename from spring-boot-project/spring-boot-all/src/test/resources/org/springframework/boot/web/server/undertow/test.jks rename to spring-boot-project/spring-boot-undertow/src/test/resources/org/springframework/boot/undertow/test.jks diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-websocket-undertow/src/test/java/smoketest/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-websocket-undertow/src/test/java/smoketest/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java index af24f1b367..4f8e955408 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-websocket-undertow/src/test/java/smoketest/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-websocket-undertow/src/test/java/smoketest/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java @@ -36,8 +36,8 @@ import org.springframework.boot.builder.SpringApplicationBuilder; 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.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.web.server.servlet.ServletWebServerFactory; -import org.springframework.boot.web.server.servlet.undertow.UndertowServletWebServerFactory; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;