diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure-all/build.gradle index 2bdaf7d28c..563693cef7 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure-all/build.gradle @@ -46,7 +46,6 @@ dependencies { optional(project(":spring-boot-project:spring-boot-security-oauth2-resource-server")) optional(project(":spring-boot-project:spring-boot-security-saml2")) optional(project(":spring-boot-project:spring-boot-tomcat")) - optional(project(":spring-boot-project:spring-boot-undertow")) optional(project(":spring-boot-project:spring-boot-validation")) optional(project(":spring-boot-project:spring-boot-webclient")) optional(project(":spring-boot-project:spring-boot-webflux")) @@ -95,7 +94,6 @@ dependencies { optional("io.r2dbc:r2dbc-pool") optional("io.r2dbc:r2dbc-proxy") optional("io.r2dbc:r2dbc-spi") - optional("io.undertow:undertow-servlet") optional("jakarta.persistence:jakarta.persistence-api") optional("jakarta.servlet:jakarta.servlet-api") optional("org.apache.activemq:activemq-broker") @@ -143,8 +141,6 @@ dependencies { testImplementation("io.prometheus:prometheus-metrics-exposition-formats") testImplementation("io.r2dbc:r2dbc-h2") testImplementation("com.squareup.okhttp3:mockwebserver") - testImplementation("io.undertow:undertow-core") - testImplementation("io.undertow:undertow-servlet") testImplementation("jakarta.xml.bind:jakarta.xml.bind-api") testImplementation("org.apache.activemq:artemis-jakarta-client") testImplementation("org.apache.activemq:artemis-jakarta-server") diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports b/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports index 0a22caad17..471bd0c64e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports +++ b/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports @@ -2,7 +2,5 @@ org.springframework.boot.actuate.autoconfigure.endpoint.web.reactive.WebFluxEndp org.springframework.boot.actuate.autoconfigure.endpoint.web.servlet.WebMvcEndpointManagementContextConfiguration org.springframework.boot.actuate.autoconfigure.security.servlet.SecurityRequestMatchersManagementContextConfiguration org.springframework.boot.actuate.autoconfigure.web.reactive.ReactiveManagementChildContextConfiguration -org.springframework.boot.actuate.autoconfigure.web.server.undertow.UndertowReactiveManagementChildContextConfiguration -org.springframework.boot.actuate.autoconfigure.web.server.undertow.UndertowServletManagementChildContextConfiguration org.springframework.boot.actuate.autoconfigure.web.servlet.ServletManagementChildContextConfiguration org.springframework.boot.actuate.autoconfigure.web.servlet.WebMvcEndpointChildContextConfiguration diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2a214cb7c4..523aeba5ef 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -67,6 +67,4 @@ org.springframework.boot.actuate.autoconfigure.web.exchanges.HttpExchangesAutoCo org.springframework.boot.actuate.autoconfigure.web.exchanges.HttpExchangesEndpointAutoConfiguration org.springframework.boot.actuate.autoconfigure.web.mappings.MappingsEndpointAutoConfiguration org.springframework.boot.actuate.autoconfigure.web.server.netty.NettyReactiveManagementContextAutoConfiguration -org.springframework.boot.actuate.autoconfigure.web.server.undertow.UndertowReactiveManagementContextAutoConfiguration -org.springframework.boot.actuate.autoconfigure.web.server.undertow.UndertowServletManagementContextAutoConfiguration org.springframework.boot.actuate.autoconfigure.web.servlet.ServletManagementContextAutoConfiguration \ No newline at end of file diff --git a/spring-boot-project/spring-boot-undertow/build.gradle b/spring-boot-project/spring-boot-undertow/build.gradle index 19881e9cf7..4c80c9247a 100644 --- a/spring-boot-project/spring-boot-undertow/build.gradle +++ b/spring-boot-project/spring-boot-undertow/build.gradle @@ -13,6 +13,7 @@ dependencies { api("io.undertow:undertow-servlet") optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional("io.undertow:undertow-websockets-jsr") optional("org.springframework:spring-webflux") diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowAccessLogCustomizer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowAccessLogCustomizer.java similarity index 95% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowAccessLogCustomizer.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowAccessLogCustomizer.java index 371a4a6ce7..8844afd827 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowAccessLogCustomizer.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowAccessLogCustomizer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.actuate.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.actuate.autoconfigure.web.server; import java.util.function.Function; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowManagementServerProperties.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowManagementServerProperties.java similarity index 94% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowManagementServerProperties.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowManagementServerProperties.java index 16d0af4046..8a3e02d31d 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowManagementServerProperties.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowManagementServerProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.actuate.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.actuate.autoconfigure.web.server; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementChildContextConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowReactiveManagementChildContextConfiguration.java similarity index 97% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementChildContextConfiguration.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowReactiveManagementChildContextConfiguration.java index fc4e4f42ae..ec6cb9beed 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementChildContextConfiguration.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowReactiveManagementChildContextConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.actuate.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.actuate.autoconfigure.web.server; import io.undertow.Undertow; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementContextAutoConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowReactiveManagementContextAutoConfiguration.java similarity index 93% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementContextAutoConfiguration.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowReactiveManagementContextAutoConfiguration.java index 68fac3e212..35035b838d 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowReactiveManagementContextAutoConfiguration.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowReactiveManagementContextAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.actuate.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.actuate.autoconfigure.web.server; import io.undertow.Undertow; @@ -37,7 +37,7 @@ import org.springframework.context.annotation.Bean; * @since 4.0.0 */ @AutoConfiguration -@ConditionalOnClass(Undertow.class) +@ConditionalOnClass({ Undertow.class, ManagementContextFactory.class }) @ConditionalOnWebApplication(type = Type.REACTIVE) @ConditionalOnManagementPort(ManagementPortType.DIFFERENT) public class UndertowReactiveManagementContextAutoConfiguration { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementChildContextConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowServletManagementChildContextConfiguration.java similarity index 96% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementChildContextConfiguration.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowServletManagementChildContextConfiguration.java index da28b0af3e..95933ec71a 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementChildContextConfiguration.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowServletManagementChildContextConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.actuate.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.actuate.autoconfigure.web.server; import io.undertow.Undertow; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementContextAutoConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowServletManagementContextAutoConfiguration.java similarity index 93% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementContextAutoConfiguration.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowServletManagementContextAutoConfiguration.java index a5cc154f31..bd51f3010b 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowServletManagementContextAutoConfiguration.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowServletManagementContextAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.actuate.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.actuate.autoconfigure.web.server; import io.undertow.Undertow; @@ -37,7 +37,7 @@ import org.springframework.context.annotation.Bean; * @since 4.0.0 */ @AutoConfiguration -@ConditionalOnClass(Undertow.class) +@ConditionalOnClass({ Undertow.class, ManagementContextFactory.class }) @ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnManagementPort(ManagementPortType.DIFFERENT) public class UndertowServletManagementContextAutoConfiguration { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/package-info.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/package-info.java similarity index 89% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/package-info.java rename to spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/package-info.java index 7a793f2912..9012069331 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/package-info.java +++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/package-info.java @@ -17,4 +17,4 @@ /** * Actuator Undertow web server support. */ -package org.springframework.boot.actuate.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.actuate.autoconfigure.web.server; diff --git a/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports b/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports new file mode 100644 index 0000000000..a9ee73a3b7 --- /dev/null +++ b/spring-boot-project/spring-boot-undertow/src/main/resources/META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports @@ -0,0 +1,2 @@ +org.springframework.boot.undertow.actuate.autoconfigure.web.server.UndertowReactiveManagementChildContextConfiguration +org.springframework.boot.undertow.actuate.autoconfigure.web.server.UndertowServletManagementChildContextConfiguration 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 index bc124b9ddf..929623a57e 100644 --- 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 @@ -1,2 +1,4 @@ +org.springframework.boot.undertow.actuate.autoconfigure.web.server.UndertowReactiveManagementContextAutoConfiguration +org.springframework.boot.undertow.actuate.autoconfigure.web.server.UndertowServletManagementContextAutoConfiguration org.springframework.boot.undertow.autoconfigure.reactive.UndertowReactiveWebServerAutoConfiguration org.springframework.boot.undertow.autoconfigure.servlet.UndertowServletWebServerAutoConfiguration diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowManagementServerPropertiesTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowManagementServerPropertiesTests.java similarity index 93% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowManagementServerPropertiesTests.java rename to spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowManagementServerPropertiesTests.java index 115f134128..725a0d04d5 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/undertow/UndertowManagementServerPropertiesTests.java +++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/actuate/autoconfigure/web/server/UndertowManagementServerPropertiesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.actuate.autoconfigure.web.server.undertow; +package org.springframework.boot.undertow.actuate.autoconfigure.web.server; import org.junit.jupiter.api.Test;