diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextAutoConfiguration.java
index 886942d34f6..4326c99fe55 100644
--- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextAutoConfiguration.java
@@ -48,7 +48,6 @@ import org.springframework.util.Assert;
*/
@AutoConfiguration
@AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE)
-@EnableConfigurationProperties(ManagementServerProperties.class)
public class ManagementContextAutoConfiguration {
@Configuration(proxyBeanMethods = false)
@@ -101,6 +100,7 @@ public class ManagementContextAutoConfiguration {
@Configuration(proxyBeanMethods = false)
@ConditionalOnManagementPort(ManagementPortType.DIFFERENT)
+ @EnableConfigurationProperties(ManagementServerProperties.class)
static class DifferentManagementContextConfiguration {
@Bean
diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties.java
index 904c3999d72..3f2b9f8aaf9 100644
--- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties.java
+++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties.java
@@ -18,10 +18,10 @@ package org.springframework.boot.actuate.autoconfigure.web.server;
import java.net.InetAddress;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.boot.web.server.Ssl;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.util.StringUtils;
/**
diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementWebServerFactoryCustomizer.java
index d7975d3db92..9d879144017 100644
--- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementWebServerFactoryCustomizer.java
+++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementWebServerFactoryCustomizer.java
@@ -23,12 +23,12 @@ import java.util.List;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.util.LambdaSafe;
import org.springframework.boot.web.server.ConfigurableWebServerFactory;
import org.springframework.boot.web.server.Ssl;
import org.springframework.boot.web.server.WebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.core.Ordered;
/**
diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementWebServerFactoryCustomizer.java
index 758dbeb2bdc..53f7332c3c3 100644
--- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementWebServerFactoryCustomizer.java
+++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementWebServerFactoryCustomizer.java
@@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.web.servlet;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementWebServerFactoryCustomizer;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory;
import org.springframework.util.StringUtils;
diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/WebMvcEndpointChildContextConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/WebMvcEndpointChildContextConfiguration.java
index 6ed8432066f..3190a7f303c 100644
--- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/WebMvcEndpointChildContextConfiguration.java
+++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/WebMvcEndpointChildContextConfiguration.java
@@ -24,9 +24,9 @@ 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.condition.ConditionalOnWebApplication.Type;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.web.error.ErrorPage;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory;
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;
diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java
index fb05991617a..88fb0e4a821 100644
--- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java
+++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java
@@ -316,15 +316,8 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
ServletSecurityContext securityContext = new ServletSecurityContext(request);
ProducibleOperationArgumentResolver producibleOperationArgumentResolver = new ProducibleOperationArgumentResolver(
() -> headers.get("Accept"));
- OperationArgumentResolver serverNamespaceArgumentResolver = OperationArgumentResolver
- .of(WebServerNamespace.class, () -> {
- WebApplicationContext applicationContext = WebApplicationContextUtils
- .getRequiredWebApplicationContext(request.getServletContext());
- return WebServerNamespace
- .from(WebServerApplicationContext.getServerNamespace(applicationContext));
- });
InvocationContext invocationContext = new InvocationContext(securityContext, arguments,
- serverNamespaceArgumentResolver, producibleOperationArgumentResolver);
+ serverNamespaceArgumentResolver(request), producibleOperationArgumentResolver);
return handleResult(this.operation.invoke(invocationContext), HttpMethod.valueOf(request.getMethod()));
}
catch (InvalidEndpointRequestException ex) {
@@ -332,6 +325,17 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
}
}
+ private OperationArgumentResolver serverNamespaceArgumentResolver(HttpServletRequest request) {
+ if (ClassUtils.isPresent("org.springframework.boot.web.server.context.WebServerApplicationContext", null)) {
+ return OperationArgumentResolver.of(WebServerNamespace.class, () -> {
+ WebApplicationContext applicationContext = WebApplicationContextUtils
+ .getRequiredWebApplicationContext(request.getServletContext());
+ return WebServerNamespace.from(WebServerApplicationContext.getServerNamespace(applicationContext));
+ });
+ }
+ return OperationArgumentResolver.of(WebServerNamespace.class, () -> null);
+ }
+
@Override
public String toString() {
return "Actuator web endpoint '" + this.operation.getId() + "'";
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 9c9fee61624..16e515b7614 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
@@ -26,7 +26,6 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
import org.springframework.boot.test.util.TestPropertyValues;
@@ -35,6 +34,7 @@ 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.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.servlet.context.AnnotationConfigServletWebServerApplicationContext;
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;
import org.springframework.context.annotation.Bean;
diff --git a/spring-boot-project/spring-boot-autoconfigure/build.gradle b/spring-boot-project/spring-boot-autoconfigure/build.gradle
index f243f6594ba..aad64e959d0 100644
--- a/spring-boot-project/spring-boot-autoconfigure/build.gradle
+++ b/spring-boot-project/spring-boot-autoconfigure/build.gradle
@@ -27,7 +27,6 @@ description = "Spring Boot AutoConfigure"
dependencies {
api(project(":spring-boot-project:spring-boot"))
- api(project(":spring-boot-project:spring-boot-web-server"))
optional("com.github.ben-manes.caffeine:caffeine")
optional("org.aspectj:aspectjweaver")
@@ -40,16 +39,11 @@ dependencies {
testFixturesCompileOnly(project(":spring-boot-project:spring-boot-test"))
testFixturesCompileOnly(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testFixturesCompileOnly("javax.cache:cache-api")
- testFixturesCompileOnly("jakarta.websocket:jakarta.websocket-api")
- testFixturesCompileOnly("jakarta.websocket:jakarta.websocket-client-api")
-
testFixturesImplementation(testFixtures(project(":spring-boot-project:spring-boot")))
- testFixturesImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot")))
- testImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
testImplementation("ch.qos.logback:logback-classic")
testImplementation("com.fasterxml.jackson.core:jackson-databind")
testImplementation("io.projectreactor:reactor-core")
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
index ad6d2ee68e7..41fc59514e4 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ b/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -1,292 +1,6 @@
{
"groups": [],
"properties": [
- {
- "name": "server.connection-timeout",
- "type": "java.time.Duration",
- "deprecation": {
- "reason": "Each server behaves differently. Use server specific properties instead.",
- "level": "error"
- }
- },
- {
- "name": "server.http2.enabled",
- "description": "Whether to enable HTTP/2 support, if the current environment supports it.",
- "defaultValue": false
- },
- {
- "name": "server.max-http-header-size",
- "deprecation": {
- "replacement": "server.max-http-request-header-size",
- "level": "error"
- }
- },
- {
- "name": "server.max-http-post-size",
- "type": "java.lang.Integer",
- "description": "Maximum size in bytes of the HTTP post content.",
- "defaultValue": 0,
- "deprecation": {
- "reason": "Use dedicated property for each container.",
- "level": "error"
- }
- },
- {
- "name": "server.port",
- "defaultValue": 8080
- },
- {
- "name": "server.reactive.session.cookie.domain",
- "description": "Domain for the cookie."
- },
- {
- "name": "server.reactive.session.cookie.http-only",
- "description": "Whether to use \"HttpOnly\" cookies for the cookie."
- },
- {
- "name": "server.reactive.session.cookie.max-age",
- "description": "Maximum age of the cookie. If a duration suffix is not specified, seconds will be used. A positive value indicates when the cookie expires relative to the current time. A value of 0 means the cookie should expire immediately. A negative value means no \"Max-Age\"."
- },
- {
- "name": "server.reactive.session.cookie.name",
- "description": "Name for the cookie."
- },
- {
- "name": "server.reactive.session.cookie.partitioned",
- "description": "Whether the generated cookie carries the Partitioned attribute."
- },
- {
- "name": "server.reactive.session.cookie.path",
- "description": "Path of the cookie."
- },
- {
- "name": "server.reactive.session.cookie.same-site",
- "description": "SameSite setting for the cookie."
- },
- {
- "name": "server.reactive.session.cookie.secure",
- "description": "Whether to always mark the cookie as secure."
- },
- {
- "name": "server.servlet.encoding.charset",
- "type": "java.nio.charset.Charset",
- "description": "Charset of HTTP requests and responses. Added to the Content-Type header if not set explicitly.",
- "deprecation": {
- "replacement": "spring.servlet.encoding.charset",
- "level": "error"
- }
- },
- {
- "name": "server.servlet.encoding.enabled",
- "type": "java.lang.Boolean",
- "description": "Whether to enable http encoding support.",
- "defaultValue": true,
- "deprecation": {
- "replacement": "spring.servlet.encoding.enabled",
- "level": "error"
- }
- },
- {
- "name": "server.servlet.encoding.force",
- "type": "java.lang.Boolean",
- "description": "Whether to force the encoding to the configured charset on HTTP requests and responses.",
- "defaultValue": false,
- "deprecation": {
- "replacement": "spring.servlet.encoding.force",
- "level": "error"
- }
- },
- {
- "name": "server.servlet.encoding.force-request",
- "type": "java.lang.Boolean",
- "description": "Whether to force the encoding to the configured charset on HTTP requests. Defaults to true when force has not been specified.",
- "defaultValue": true,
- "deprecation": {
- "replacement": "spring.servlet.encoding.force-request",
- "level": "error"
- }
- },
- {
- "name": "server.servlet.encoding.force-response",
- "type": "java.lang.Boolean",
- "description": "Whether to force the encoding to the configured charset on HTTP responses.",
- "defaultValue": false,
- "deprecation": {
- "replacement": "spring.servlet.encoding.force-response",
- "level": "error"
- }
- },
- {
- "name": "server.servlet.jsp.class-name",
- "description": "Class name of the servlet to use for JSPs. If registered is true and this class\n\t * is on the classpath then it will be registered.",
- "defaultValue": "org.apache.jasper.servlet.JspServlet"
- },
- {
- "name": "server.servlet.jsp.init-parameters",
- "description": "Init parameters used to configure the JSP servlet."
- },
- {
- "name": "server.servlet.path",
- "type": "java.lang.String",
- "description": "Path of the main dispatcher servlet.",
- "defaultValue": "/",
- "deprecation": {
- "replacement": "spring.mvc.servlet.path",
- "level": "error"
- }
- },
- {
- "name": "server.servlet.session.cookie.comment",
- "description": "Comment for the cookie.",
- "deprecation": {
- "level": "error"
- }
- },
- {
- "name": "server.servlet.session.cookie.domain",
- "description": "Domain for the cookie."
- },
- {
- "name": "server.servlet.session.cookie.http-only",
- "description": "Whether to use \"HttpOnly\" cookies for the cookie."
- },
- {
- "name": "server.servlet.session.cookie.max-age",
- "description": "Maximum age of the cookie. If a duration suffix is not specified, seconds will be used. A positive value indicates when the cookie expires relative to the current time. A value of 0 means the cookie should expire immediately. A negative value means no \"Max-Age\"."
- },
- {
- "name": "server.servlet.session.cookie.name",
- "description": "Name of the cookie."
- },
- {
- "name": "server.servlet.session.cookie.partitioned",
- "description": "Whether the generated cookie carries the Partitioned attribute."
- },
- {
- "name": "server.servlet.session.cookie.path",
- "description": "Path of the cookie."
- },
- {
- "name": "server.servlet.session.cookie.same-site",
- "description": "SameSite setting for the cookie."
- },
- {
- "name": "server.servlet.session.cookie.secure",
- "description": "Whether to always mark the cookie as secure."
- },
- {
- "name": "server.servlet.session.persistent",
- "description": "Whether to persist session data between restarts.",
- "defaultValue": false
- },
- {
- "name": "server.servlet.session.store-dir",
- "description": "Directory used to store session data."
- },
- {
- "name": "server.servlet.session.timeout",
- "description": "Session timeout. If a duration suffix is not specified, seconds will be used.",
- "defaultValue": "30m"
- },
- {
- "name": "server.servlet.session.tracking-modes",
- "description": "Session tracking modes."
- },
- {
- "name": "server.ssl.bundle",
- "description": "Name of a configured SSL bundle."
- },
- {
- "name": "server.ssl.certificate",
- "description": "Path to a PEM-encoded SSL certificate file."
- },
- {
- "name": "server.ssl.certificate-private-key",
- "description": "Path to a PEM-encoded private key file for the SSL certificate."
- },
- {
- "name": "server.ssl.ciphers",
- "description": "Supported SSL ciphers."
- },
- {
- "name": "server.ssl.client-auth",
- "description": "Client authentication mode. Requires a trust store."
- },
- {
- "name": "server.ssl.enabled",
- "description": "Whether to enable SSL support.",
- "defaultValue": true
- },
- {
- "name": "server.ssl.enabled-protocols",
- "description": "Enabled SSL protocols."
- },
- {
- "name": "server.ssl.key-alias",
- "description": "Alias that identifies the key in the key store."
- },
- {
- "name": "server.ssl.key-password",
- "description": "Password used to access the key in the key store."
- },
- {
- "name": "server.ssl.key-store",
- "description": "Path to the key store that holds the SSL certificate (typically a jks file)."
- },
- {
- "name": "server.ssl.key-store-password",
- "description": "Password used to access the key store."
- },
- {
- "name": "server.ssl.key-store-provider",
- "description": "Provider for the key store."
- },
- {
- "name": "server.ssl.key-store-type",
- "description": "Type of the key store."
- },
- {
- "name": "server.ssl.protocol",
- "description": "SSL protocol to use.",
- "defaultValue": "TLS"
- },
- {
- "name": "server.ssl.server-name-bundles",
- "description": "Mapping of host names to SSL bundles for SNI configuration."
- },
- {
- "name": "server.ssl.trust-certificate",
- "description": "Path to a PEM-encoded SSL certificate authority file."
- },
- {
- "name": "server.ssl.trust-certificate-private-key",
- "description": "Path to a PEM-encoded private key file for the SSL certificate authority."
- },
- {
- "name": "server.ssl.trust-store",
- "description": "Trust store that holds SSL certificates."
- },
- {
- "name": "server.ssl.trust-store-password",
- "description": "Password used to access the trust store."
- },
- {
- "name": "server.ssl.trust-store-provider",
- "description": "Provider for the trust store."
- },
- {
- "name": "server.ssl.trust-store-type",
- "description": "Type of the trust store."
- },
- {
- "name": "server.use-forward-headers",
- "type": "java.lang.Boolean",
- "deprecation": {
- "reason": "Replaced to support additional strategies.",
- "replacement": "server.forward-headers-strategy",
- "level": "error"
- }
- },
{
"name": "spring.aop.auto",
"type": "java.lang.Boolean",
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnNotWebApplicationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnNotWebApplicationTests.java
index dfc08e3cc5a..df240aa9931 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnNotWebApplicationTests.java
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnNotWebApplicationTests.java
@@ -17,16 +17,12 @@
package org.springframework.boot.autoconfigure.condition;
import org.junit.jupiter.api.Test;
-import reactor.core.publisher.Mono;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
-import org.springframework.boot.web.server.reactive.MockReactiveWebServerFactory;
-import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.http.server.reactive.HttpHandler;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
@@ -47,8 +43,7 @@ class ConditionalOnNotWebApplicationTests {
@Test
void testNotWebApplicationWithReactiveContext() {
- new ReactiveWebApplicationContextRunner()
- .withUserConfiguration(ReactiveApplicationConfig.class, NotWebApplicationConfiguration.class)
+ new ReactiveWebApplicationContextRunner().withUserConfiguration(NotWebApplicationConfiguration.class)
.run((context) -> assertThat(context).doesNotHaveBean(String.class));
}
@@ -58,21 +53,6 @@ class ConditionalOnNotWebApplicationTests {
.run((context) -> assertThat(context).getBeans(String.class).containsExactly(entry("none", "none")));
}
- @Configuration(proxyBeanMethods = false)
- static class ReactiveApplicationConfig {
-
- @Bean
- ReactiveWebServerFactory reactiveWebServerFactory() {
- return new MockReactiveWebServerFactory();
- }
-
- @Bean
- HttpHandler httpHandler() {
- return (request, response) -> Mono.empty();
- }
-
- }
-
@Configuration(proxyBeanMethods = false)
@ConditionalOnNotWebApplication
static class NotWebApplicationConfiguration {
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnWebApplicationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnWebApplicationTests.java
index fdb75287604..4f926eb41be 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnWebApplicationTests.java
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnWebApplicationTests.java
@@ -18,18 +18,14 @@ package org.springframework.boot.autoconfigure.condition;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
-import reactor.core.publisher.Mono;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.web.context.reactive.AnnotationConfigReactiveWebApplicationContext;
import org.springframework.boot.web.context.servlet.AnnotationConfigServletWebApplicationContext;
-import org.springframework.boot.web.server.reactive.MockReactiveWebServerFactory;
-import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.http.server.reactive.HttpHandler;
import org.springframework.mock.web.MockServletContext;
import static org.assertj.core.api.Assertions.assertThat;
@@ -116,16 +112,6 @@ class ConditionalOnWebApplicationTests {
return "reactive";
}
- @Bean
- ReactiveWebServerFactory reactiveWebServerFactory() {
- return new MockReactiveWebServerFactory();
- }
-
- @Bean
- HttpHandler httpHandler() {
- return (request, response) -> Mono.empty();
- }
-
}
}
diff --git a/spring-boot-project/spring-boot-devtools/build.gradle b/spring-boot-project/spring-boot-devtools/build.gradle
index bc2fb152d01..7c0daa7b024 100644
--- a/spring-boot-project/spring-boot-devtools/build.gradle
+++ b/spring-boot-project/spring-boot-devtools/build.gradle
@@ -58,6 +58,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-r2dbc"))
optional(project(":spring-boot-project:spring-boot-reactor"))
optional(project(":spring-boot-project:spring-boot-security"))
+ optional(project(":spring-boot-project:spring-boot-web-server"))
optional("io.r2dbc:r2dbc-spi")
optional("jakarta.servlet:jakarta.servlet-api")
optional("org.apache.derby:derbytools")
diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfiguration.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfiguration.java
index 8400fa4453f..08ad3887a86 100644
--- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/RemoteDevToolsAutoConfiguration.java
@@ -28,8 +28,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProp
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
-import org.springframework.boot.autoconfigure.web.ServerProperties.Servlet;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.devtools.remote.server.AccessManager;
import org.springframework.boot.devtools.remote.server.Dispatcher;
@@ -43,6 +41,8 @@ import org.springframework.boot.devtools.restart.server.DefaultSourceDirectoryUr
import org.springframework.boot.devtools.restart.server.HttpRestartServer;
import org.springframework.boot.devtools.restart.server.HttpRestartServerHandler;
import org.springframework.boot.devtools.restart.server.SourceDirectoryUrlFilter;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties.Servlet;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@@ -61,7 +61,7 @@ import org.springframework.http.server.ServerHttpRequest;
@AutoConfiguration(afterName = "org.springframework.boot.security.autoconfigure.servlet.SecurityAutoConfiguration")
@ConditionalOnEnabledDevTools
@ConditionalOnProperty("spring.devtools.remote.secret")
-@ConditionalOnClass({ Filter.class, ServerHttpRequest.class })
+@ConditionalOnClass({ Filter.class, ServerHttpRequest.class, ServerProperties.class })
@Import(RemoteDevtoolsSecurityConfiguration.class)
@EnableConfigurationProperties({ ServerProperties.class, DevToolsProperties.class })
public class RemoteDevToolsAutoConfiguration {
diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/RemoteDevtoolsSecurityConfiguration.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/RemoteDevtoolsSecurityConfiguration.java
index 5afb75fc134..8d685c6df3e 100644
--- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/RemoteDevtoolsSecurityConfiguration.java
+++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/RemoteDevtoolsSecurityConfiguration.java
@@ -17,8 +17,8 @@
package org.springframework.boot.devtools.autoconfigure;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.security.autoconfigure.SecurityProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle
index 37cdc5e5540..0cac54cfa05 100644
--- a/spring-boot-project/spring-boot-docs/build.gradle
+++ b/spring-boot-project/spring-boot-docs/build.gradle
@@ -231,6 +231,7 @@ dependencies {
configurationProperties(project(path: ":spring-boot-project:spring-boot-tx", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-undertow", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-webflux", configuration: "configurationPropertiesMetadata"))
+ configurationProperties(project(path: ":spring-boot-project:spring-boot-web-server", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-webmvc", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-webservices", configuration: "configurationPropertiesMetadata"))
diff --git a/spring-boot-project/spring-boot-http-converter/src/test/java/org/springframework/boot/http/converter/autoconfigure/HttpMessageConvertersAutoConfigurationTests.java b/spring-boot-project/spring-boot-http-converter/src/test/java/org/springframework/boot/http/converter/autoconfigure/HttpMessageConvertersAutoConfigurationTests.java
index f34a2737f73..93c7974fd8e 100644
--- a/spring-boot-project/spring-boot-http-converter/src/test/java/org/springframework/boot/http/converter/autoconfigure/HttpMessageConvertersAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-http-converter/src/test/java/org/springframework/boot/http/converter/autoconfigure/HttpMessageConvertersAutoConfigurationTests.java
@@ -26,7 +26,6 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.http.converter.autoconfigure.JacksonHttpMessageConvertersConfiguration.MappingJackson2HttpMessageConverterConfiguration;
import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.assertj.AssertableApplicationContext;
@@ -265,16 +264,6 @@ class HttpMessageConvertersAutoConfigurationTests {
});
}
- @Test // gh-21789
- void whenAutoConfigurationIsActiveThenServerPropertiesConfigurationPropertiesAreNotEnabled() {
- new WebApplicationContextRunner()
- .withConfiguration(AutoConfigurations.of(HttpMessageConvertersAutoConfiguration.class))
- .run((context) -> {
- assertThat(context).hasSingleBean(HttpMessageConverters.class);
- assertThat(context).doesNotHaveBean(ServerProperties.class);
- });
- }
-
private ApplicationContextRunner allOptionsRunner() {
return this.contextRunner.withBean(Gson.class)
.withBean(ObjectMapper.class)
diff --git a/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerConfiguration.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerConfiguration.java
index 62729bad506..dcf7d8656d5 100644
--- a/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerConfiguration.java
+++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerConfiguration.java
@@ -19,9 +19,9 @@ package org.springframework.boot.jetty.autoconfigure;
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeployment;
import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading;
import org.springframework.boot.autoconfigure.thread.Threading;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.jetty.autoconfigure.reactive.JettyReactiveWebServerAutoConfiguration;
import org.springframework.boot.jetty.autoconfigure.servlet.JettyServletWebServerAutoConfiguration;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
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-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizer.java
index b01a5677498..9b0abed2ef1 100644
--- a/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizer.java
+++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizer.java
@@ -32,12 +32,12 @@ import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.RequestLogWriter;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory;
import org.springframework.boot.jetty.autoconfigure.JettyServerProperties.Accesslog;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.core.Ordered;
import org.springframework.core.env.Environment;
import org.springframework.util.CollectionUtils;
diff --git a/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfiguration.java
index 1b18b87634b..8e193df1218 100644
--- a/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfiguration.java
@@ -26,12 +26,12 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
-import org.springframework.boot.autoconfigure.web.server.reactive.ReactiveWebServerConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jetty.JettyServerCustomizer;
import org.springframework.boot.jetty.autoconfigure.JettyServerProperties;
import org.springframework.boot.jetty.autoconfigure.JettyWebServerConfiguration;
import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory;
+import org.springframework.boot.web.server.autoconfigure.reactive.ReactiveWebServerConfiguration;
import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfiguration.java
index 90a54b34b1c..2e7f32536b2 100644
--- a/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-jetty/src/main/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfiguration.java
@@ -36,13 +36,13 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeplo
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.autoconfigure.condition.SearchStrategy;
-import org.springframework.boot.autoconfigure.web.server.servlet.ServletWebServerConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jetty.JettyServerCustomizer;
import org.springframework.boot.jetty.autoconfigure.JettyServerProperties;
import org.springframework.boot.jetty.autoconfigure.JettyWebServerConfiguration;
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.servlet.ServletWebServerConfiguration;
import org.springframework.boot.web.server.servlet.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizerTests.java
index 87ca5c6b861..19ab90209c1 100644
--- a/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizerTests.java
+++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/JettyWebServerFactoryCustomizerTests.java
@@ -41,14 +41,14 @@ import org.eclipse.jetty.util.thread.ThreadPool;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
-import org.springframework.boot.autoconfigure.web.ServerProperties.ForwardHeadersStrategy;
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.jetty.ConfigurableJettyWebServerFactory;
import org.springframework.boot.jetty.JettyWebServer;
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties.ForwardHeadersStrategy;
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-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfigurationTests.java
index d24cdb7fbca..10e4c06f5cc 100644
--- a/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/reactive/JettyReactiveWebServerAutoConfigurationTests.java
@@ -22,12 +22,12 @@ import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.StatisticsHandler;
import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.web.server.reactive.AbstractReactiveWebServerAutoConfigurationTests;
import org.springframework.boot.jetty.JettyServerCustomizer;
import org.springframework.boot.jetty.JettyWebServer;
import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory;
import org.springframework.boot.web.server.WebServer;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.reactive.AbstractReactiveWebServerAutoConfigurationTests;
import org.springframework.boot.web.server.reactive.context.ReactiveWebServerApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfigurationTests.java
index 92d94c06c6e..70eaaabaee9 100644
--- a/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/servlet/JettyServletWebServerAutoConfigurationTests.java
@@ -24,10 +24,10 @@ import org.eclipse.jetty.server.Server;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.boot.autoconfigure.web.server.servlet.AbstractServletWebServerAutoConfigurationTests;
import org.springframework.boot.jetty.JettyServerCustomizer;
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.servlet.AbstractServletWebServerAutoConfigurationTests;
import org.springframework.boot.web.servlet.AbstractFilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.context.annotation.Bean;
diff --git a/spring-boot-project/spring-boot-reactor-netty/src/main/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-reactor-netty/src/main/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerAutoConfiguration.java
index d1385f1260e..b552a858261 100644
--- a/spring-boot-project/spring-boot-reactor-netty/src/main/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-reactor-netty/src/main/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerAutoConfiguration.java
@@ -23,13 +23,13 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
-import org.springframework.boot.autoconfigure.web.server.reactive.ReactiveWebServerConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.reactor.netty.NettyRouteProvider;
import org.springframework.boot.reactor.netty.NettyServerCustomizer;
import org.springframework.boot.reactor.netty.autoconfigure.ReactorNettyConfigurations.ReactorResourceFactoryConfiguration;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
+import org.springframework.boot.web.server.autoconfigure.reactive.ReactiveWebServerConfiguration;
import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
diff --git a/spring-boot-project/spring-boot-reactor-netty/src/main/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-reactor-netty/src/main/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerFactoryCustomizer.java
index bb3e8dac840..9c812f60fc6 100644
--- a/spring-boot-project/spring-boot-reactor-netty/src/main/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerFactoryCustomizer.java
+++ b/spring-boot-project/spring-boot-reactor-netty/src/main/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerFactoryCustomizer.java
@@ -20,11 +20,11 @@ import java.time.Duration;
import io.netty.channel.ChannelOption;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.core.Ordered;
import org.springframework.core.env.Environment;
diff --git a/spring-boot-project/spring-boot-reactor-netty/src/test/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-reactor-netty/src/test/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerAutoConfigurationTests.java
index 20ee824e0a4..453fdfc83b1 100644
--- a/spring-boot-project/spring-boot-reactor-netty/src/test/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-reactor-netty/src/test/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerAutoConfigurationTests.java
@@ -19,10 +19,10 @@ package org.springframework.boot.reactor.netty.autoconfigure;
import org.junit.jupiter.api.Test;
import reactor.netty.http.server.HttpServer;
-import org.springframework.boot.autoconfigure.web.server.reactive.AbstractReactiveWebServerAutoConfigurationTests;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.reactor.netty.NettyServerCustomizer;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.reactive.AbstractReactiveWebServerAutoConfigurationTests;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-reactor-netty/src/test/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-reactor-netty/src/test/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerFactoryCustomizerTests.java
index 8b1c29927d2..f8e210bf165 100644
--- a/spring-boot-project/spring-boot-reactor-netty/src/test/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerFactoryCustomizerTests.java
+++ b/spring-boot-project/spring-boot-reactor-netty/src/test/java/org/springframework/boot/reactor/netty/autoconfigure/NettyReactiveWebServerFactoryCustomizerTests.java
@@ -30,10 +30,10 @@ import reactor.netty.http.Http2SettingsSpec;
import reactor.netty.http.server.HttpRequestDecoderSpec;
import reactor.netty.http.server.HttpServer;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.reactor.netty.NettyServerCustomizer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.mock.env.MockEnvironment;
import org.springframework.util.unit.DataSize;
diff --git a/spring-boot-project/spring-boot-security/build.gradle b/spring-boot-project/spring-boot-security/build.gradle
index 9cd4eafeb75..ed6c09e78de 100644
--- a/spring-boot-project/spring-boot-security/build.gradle
+++ b/spring-boot-project/spring-boot-security/build.gradle
@@ -43,6 +43,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-reactor"))
optional(project(":spring-boot-project:spring-boot-rsocket"))
optional(project(":spring-boot-project:spring-boot-webmvc"))
+ optional(project(":spring-boot-project:spring-boot-web-server"))
optional("jakarta.servlet:jakarta.servlet-api")
optional("org.springframework:spring-messaging")
optional("org.springframework:spring-webflux")
diff --git a/spring-boot-project/spring-boot-security/src/test/java/org/springframework/boot/security/autoconfigure/reactive/StaticResourceRequestTests.java b/spring-boot-project/spring-boot-security/src/test/java/org/springframework/boot/security/autoconfigure/reactive/StaticResourceRequestTests.java
index a56bd1f98ad..552cbedccd9 100644
--- a/spring-boot-project/spring-boot-security/src/test/java/org/springframework/boot/security/autoconfigure/reactive/StaticResourceRequestTests.java
+++ b/spring-boot-project/spring-boot-security/src/test/java/org/springframework/boot/security/autoconfigure/reactive/StaticResourceRequestTests.java
@@ -21,8 +21,8 @@ import java.time.Duration;
import org.assertj.core.api.AssertDelegateTarget;
import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.security.autoconfigure.StaticResourceLocation;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.support.StaticApplicationContext;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.ServerHttpResponse;
diff --git a/spring-boot-project/spring-boot-security/src/test/java/org/springframework/boot/security/autoconfigure/servlet/PathRequestTests.java b/spring-boot-project/spring-boot-security/src/test/java/org/springframework/boot/security/autoconfigure/servlet/PathRequestTests.java
index 31b96fb8f97..b110e461838 100644
--- a/spring-boot-project/spring-boot-security/src/test/java/org/springframework/boot/security/autoconfigure/servlet/PathRequestTests.java
+++ b/spring-boot-project/spring-boot-security/src/test/java/org/springframework/boot/security/autoconfigure/servlet/PathRequestTests.java
@@ -20,8 +20,8 @@ import jakarta.servlet.http.HttpServletRequest;
import org.assertj.core.api.AssertDelegateTarget;
import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.h2console.autoconfigure.H2ConsoleProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockServletContext;
import org.springframework.security.web.util.matcher.RequestMatcher;
diff --git a/spring-boot-project/spring-boot-session-data-mongodb/build.gradle b/spring-boot-project/spring-boot-session-data-mongodb/build.gradle
index 1255f197eed..1077ec7da14 100644
--- a/spring-boot-project/spring-boot-session-data-mongodb/build.gradle
+++ b/spring-boot-project/spring-boot-session-data-mongodb/build.gradle
@@ -32,14 +32,13 @@ dependencies {
api("org.springframework.session:spring-session-data-mongodb")
implementation(project(":spring-boot-project:spring-boot-data-mongodb"))
+ implementation(project(":spring-boot-project:spring-boot-web-server"))
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-webflux"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
- dockerTestImplementation(project(":spring-boot-project:spring-boot-webflux"))
- dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot")))
dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-session")))
dockerTestImplementation("org.mongodb:mongodb-driver-reactivestreams")
diff --git a/spring-boot-project/spring-boot-session-data-mongodb/src/dockerTest/java/org/springframework/boot/session/data/mongodb/autoconfigure/MongoSessionAutoConfigurationTests.java b/spring-boot-project/spring-boot-session-data-mongodb/src/dockerTest/java/org/springframework/boot/session/data/mongodb/autoconfigure/MongoSessionAutoConfigurationTests.java
index d8c66b2a413..9596c02b020 100644
--- a/spring-boot-project/spring-boot-session-data-mongodb/src/dockerTest/java/org/springframework/boot/session/data/mongodb/autoconfigure/MongoSessionAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-session-data-mongodb/src/dockerTest/java/org/springframework/boot/session/data/mongodb/autoconfigure/MongoSessionAutoConfigurationTests.java
@@ -25,7 +25,6 @@ import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration;
import org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration;
import org.springframework.boot.session.autoconfigure.AbstractSessionAutoConfigurationTests;
@@ -34,6 +33,7 @@ import org.springframework.boot.test.context.assertj.AssertableWebApplicationCon
import org.springframework.boot.test.context.runner.ContextConsumer;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.testsupport.container.TestImage;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.config.SessionRepositoryCustomizer;
diff --git a/spring-boot-project/spring-boot-session-data-mongodb/src/main/java/org/springframework/boot/session/data/mongodb/autoconfigure/MongoSessionAutoConfiguration.java b/spring-boot-project/spring-boot-session-data-mongodb/src/main/java/org/springframework/boot/session/data/mongodb/autoconfigure/MongoSessionAutoConfiguration.java
index ea50b837503..62ec675b385 100644
--- a/spring-boot-project/spring-boot-session-data-mongodb/src/main/java/org/springframework/boot/session/data/mongodb/autoconfigure/MongoSessionAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-session-data-mongodb/src/main/java/org/springframework/boot/session/data/mongodb/autoconfigure/MongoSessionAutoConfiguration.java
@@ -23,13 +23,13 @@ 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.condition.ConditionalOnWebApplication.Type;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration;
import org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
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-session-data-redis/build.gradle b/spring-boot-project/spring-boot-session-data-redis/build.gradle
index 2439d211357..89c474680a0 100644
--- a/spring-boot-project/spring-boot-session-data-redis/build.gradle
+++ b/spring-boot-project/spring-boot-session-data-redis/build.gradle
@@ -32,14 +32,13 @@ dependencies {
api("org.springframework.session:spring-session-data-redis")
implementation(project(":spring-boot-project:spring-boot-data-redis"))
+ implementation(project(":spring-boot-project:spring-boot-web-server"))
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-webflux"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
- dockerTestImplementation(project(":spring-boot-project:spring-boot-webflux"))
- dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot")))
dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-session")))
dockerTestImplementation("com.redis:testcontainers-redis")
diff --git a/spring-boot-project/spring-boot-session-data-redis/src/dockerTest/java/org/springframework/boot/session/data/redis/autoconfigure/ReactiveRedisSessionAutoConfigurationTests.java b/spring-boot-project/spring-boot-session-data-redis/src/dockerTest/java/org/springframework/boot/session/data/redis/autoconfigure/ReactiveRedisSessionAutoConfigurationTests.java
index d7534974ed8..ac209da06df 100644
--- a/spring-boot-project/spring-boot-session-data-redis/src/dockerTest/java/org/springframework/boot/session/data/redis/autoconfigure/ReactiveRedisSessionAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-session-data-redis/src/dockerTest/java/org/springframework/boot/session/data/redis/autoconfigure/ReactiveRedisSessionAutoConfigurationTests.java
@@ -28,7 +28,6 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import reactor.core.publisher.Mono;
import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration;
import org.springframework.boot.session.autoconfigure.AbstractReactiveSessionAutoConfigurationTests;
@@ -37,6 +36,7 @@ import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplic
import org.springframework.boot.test.context.runner.ContextConsumer;
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
import org.springframework.boot.testsupport.container.TestImage;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.webflux.autoconfigure.WebSessionIdResolverAutoConfiguration;
import org.springframework.data.redis.connection.ReactiveRedisConnection;
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
diff --git a/spring-boot-project/spring-boot-session-data-redis/src/dockerTest/java/org/springframework/boot/session/data/redis/autoconfigure/RedisSessionAutoConfigurationTests.java b/spring-boot-project/spring-boot-session-data-redis/src/dockerTest/java/org/springframework/boot/session/data/redis/autoconfigure/RedisSessionAutoConfigurationTests.java
index 9173281d925..3249fc1722b 100644
--- a/spring-boot-project/spring-boot-session-data-redis/src/dockerTest/java/org/springframework/boot/session/data/redis/autoconfigure/RedisSessionAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-session-data-redis/src/dockerTest/java/org/springframework/boot/session/data/redis/autoconfigure/RedisSessionAutoConfigurationTests.java
@@ -26,7 +26,6 @@ import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException;
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.session.autoconfigure.AbstractSessionAutoConfigurationTests;
@@ -35,6 +34,7 @@ import org.springframework.boot.test.context.assertj.AssertableWebApplicationCon
import org.springframework.boot.test.context.runner.ContextConsumer;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.testsupport.container.TestImage;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnection;
diff --git a/spring-boot-project/spring-boot-session-data-redis/src/main/java/org/springframework/boot/session/data/redis/autoconfigure/RedisSessionAutoConfiguration.java b/spring-boot-project/spring-boot-session-data-redis/src/main/java/org/springframework/boot/session/data/redis/autoconfigure/RedisSessionAutoConfiguration.java
index 126ceb3acba..f3a28c14dcb 100644
--- a/spring-boot-project/spring-boot-session-data-redis/src/main/java/org/springframework/boot/session/data/redis/autoconfigure/RedisSessionAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-session-data-redis/src/main/java/org/springframework/boot/session/data/redis/autoconfigure/RedisSessionAutoConfiguration.java
@@ -24,7 +24,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException;
@@ -32,6 +31,7 @@ import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
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-session-hazelcast/build.gradle b/spring-boot-project/spring-boot-session-hazelcast/build.gradle
index d2207c523e8..0e2c43d9887 100644
--- a/spring-boot-project/spring-boot-session-hazelcast/build.gradle
+++ b/spring-boot-project/spring-boot-session-hazelcast/build.gradle
@@ -31,6 +31,7 @@ dependencies {
api("org.springframework.session:spring-session-hazelcast")
implementation(project(":spring-boot-project:spring-boot-hazelcast"))
+ implementation(project(":spring-boot-project:spring-boot-web-server"))
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
diff --git a/spring-boot-project/spring-boot-session-hazelcast/src/main/java/org/springframework/boot/session/hazelcast/autoconfigure/HazelcastSessionAutoConfiguration.java b/spring-boot-project/spring-boot-session-hazelcast/src/main/java/org/springframework/boot/session/hazelcast/autoconfigure/HazelcastSessionAutoConfiguration.java
index a4c4264ad54..3569c499e04 100644
--- a/spring-boot-project/spring-boot-session-hazelcast/src/main/java/org/springframework/boot/session/hazelcast/autoconfigure/HazelcastSessionAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-session-hazelcast/src/main/java/org/springframework/boot/session/hazelcast/autoconfigure/HazelcastSessionAutoConfiguration.java
@@ -25,11 +25,11 @@ 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.condition.ConditionalOnWebApplication.Type;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.core.Ordered;
diff --git a/spring-boot-project/spring-boot-session-hazelcast/src/test/java/org/springframework/boot/session/hazelcast/autoconfigure/HazelcastSessionAutoConfigurationTests.java b/spring-boot-project/spring-boot-session-hazelcast/src/test/java/org/springframework/boot/session/hazelcast/autoconfigure/HazelcastSessionAutoConfigurationTests.java
index 46d37c988d2..58b5a10d2cd 100644
--- a/spring-boot-project/spring-boot-session-hazelcast/src/test/java/org/springframework/boot/session/hazelcast/autoconfigure/HazelcastSessionAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-session-hazelcast/src/test/java/org/springframework/boot/session/hazelcast/autoconfigure/HazelcastSessionAutoConfigurationTests.java
@@ -24,10 +24,10 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.session.autoconfigure.AbstractSessionAutoConfigurationTests;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.FlushMode;
diff --git a/spring-boot-project/spring-boot-session-jdbc/build.gradle b/spring-boot-project/spring-boot-session-jdbc/build.gradle
index 58c1a1ea9b9..93585fa80f2 100644
--- a/spring-boot-project/spring-boot-session-jdbc/build.gradle
+++ b/spring-boot-project/spring-boot-session-jdbc/build.gradle
@@ -31,6 +31,7 @@ dependencies {
api("org.springframework.session:spring-session-jdbc")
implementation(project(":spring-boot-project:spring-boot-jdbc"))
+ implementation(project(":spring-boot-project:spring-boot-web-server"))
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
diff --git a/spring-boot-project/spring-boot-session-jdbc/src/main/java/org/springframework/boot/session/jdbc/autoconfigure/JdbcSessionAutoConfiguration.java b/spring-boot-project/spring-boot-session-jdbc/src/main/java/org/springframework/boot/session/jdbc/autoconfigure/JdbcSessionAutoConfiguration.java
index 94f62d3512c..3a26e383094 100644
--- a/spring-boot-project/spring-boot-session-jdbc/src/main/java/org/springframework/boot/session/jdbc/autoconfigure/JdbcSessionAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-session-jdbc/src/main/java/org/springframework/boot/session/jdbc/autoconfigure/JdbcSessionAutoConfiguration.java
@@ -26,13 +26,13 @@ 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.condition.ConditionalOnWebApplication.Type;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionProperties;
import org.springframework.boot.sql.autoconfigure.init.OnDatabaseInitializationCondition;
import org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Import;
diff --git a/spring-boot-project/spring-boot-session-jdbc/src/test/java/org/springframework/boot/session/jdbc/autoconfigure/JdbcSessionAutoConfigurationTests.java b/spring-boot-project/spring-boot-session-jdbc/src/test/java/org/springframework/boot/session/jdbc/autoconfigure/JdbcSessionAutoConfigurationTests.java
index 638b4a23761..5a6759b5b1a 100644
--- a/spring-boot-project/spring-boot-session-jdbc/src/test/java/org/springframework/boot/session/jdbc/autoconfigure/JdbcSessionAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-session-jdbc/src/test/java/org/springframework/boot/session/jdbc/autoconfigure/JdbcSessionAutoConfigurationTests.java
@@ -26,7 +26,6 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration;
@@ -39,6 +38,7 @@ import org.springframework.boot.sql.init.DatabaseInitializationMode;
import org.springframework.boot.sql.init.DatabaseInitializationSettings;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.testsupport.classpath.resources.WithResource;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
diff --git a/spring-boot-project/spring-boot-session/build.gradle b/spring-boot-project/spring-boot-session/build.gradle
index 3249047a52f..75dbe70e69e 100644
--- a/spring-boot-project/spring-boot-session/build.gradle
+++ b/spring-boot-project/spring-boot-session/build.gradle
@@ -30,6 +30,8 @@ dependencies {
api(project(":spring-boot-project:spring-boot"))
api("org.springframework.session:spring-session-core")
+ implementation(project(":spring-boot-project:spring-boot-web-server"))
+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("jakarta.servlet:jakarta.servlet-api")
optional("org.springframework.security:spring-security-web")
diff --git a/spring-boot-project/spring-boot-session/src/main/java/org/springframework/boot/session/autoconfigure/SessionAutoConfiguration.java b/spring-boot-project/spring-boot-session/src/main/java/org/springframework/boot/session/autoconfigure/SessionAutoConfiguration.java
index ace9cdcb291..d38336e163b 100644
--- a/spring-boot-project/spring-boot-session/src/main/java/org/springframework/boot/session/autoconfigure/SessionAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-session/src/main/java/org/springframework/boot/session/autoconfigure/SessionAutoConfiguration.java
@@ -27,11 +27,11 @@ 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.condition.ConditionalOnWebApplication.Type;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.web.server.Cookie;
import org.springframework.boot.web.server.Cookie.SameSite;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-session/src/test/java/org/springframework/boot/session/autoconfigure/SessionAutoConfigurationTests.java b/spring-boot-project/spring-boot-session/src/test/java/org/springframework/boot/session/autoconfigure/SessionAutoConfigurationTests.java
index fa3a5b9d336..91650bd17f8 100644
--- a/spring-boot-project/spring-boot-session/src/test/java/org/springframework/boot/session/autoconfigure/SessionAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-session/src/test/java/org/springframework/boot/session/autoconfigure/SessionAutoConfigurationTests.java
@@ -24,9 +24,9 @@ import org.junit.jupiter.api.Test;
import org.mockito.InOrder;
import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.servlet.AbstractFilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcAutoConfiguration.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcAutoConfiguration.java
index 56190284c95..7183b02f412 100644
--- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/MockMvcAutoConfiguration.java
@@ -23,9 +23,9 @@ 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.condition.ConditionalOnWebApplication.Type;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.autoconfigure.web.reactive.WebTestClientAutoConfiguration;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.test.client.reactive.WebTestClientBuilderCustomizer;
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletPath;
import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration;
diff --git a/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerConfiguration.java b/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerConfiguration.java
index bf6dce50b54..799eb73f433 100644
--- a/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerConfiguration.java
+++ b/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerConfiguration.java
@@ -22,9 +22,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
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.tomcat.autoconfigure.reactive.TomcatReactiveWebServerAutoConfiguration;
import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
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-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerFactoryCustomizer.java
index 32a7e0ec55e..16ee01c871d 100644
--- a/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerFactoryCustomizer.java
+++ b/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerFactoryCustomizer.java
@@ -34,7 +34,6 @@ import org.apache.coyote.http2.Http2Protocol;
import org.springframework.boot.autoconfigure.web.ErrorProperties;
import org.springframework.boot.autoconfigure.web.ErrorProperties.IncludeAttribute;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.tomcat.ConfigurableTomcatWebServerFactory;
@@ -42,6 +41,7 @@ import org.springframework.boot.tomcat.autoconfigure.TomcatServerProperties.Acce
import org.springframework.boot.tomcat.autoconfigure.TomcatServerProperties.Remoteip;
import org.springframework.boot.tomcat.autoconfigure.TomcatServerProperties.UseApr;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.core.Ordered;
import org.springframework.core.env.Environment;
import org.springframework.util.Assert;
diff --git a/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/reactive/TomcatReactiveWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/reactive/TomcatReactiveWebServerAutoConfiguration.java
index 684ecc0eeef..4224a9844f3 100644
--- a/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/reactive/TomcatReactiveWebServerAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/reactive/TomcatReactiveWebServerAutoConfiguration.java
@@ -24,7 +24,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
-import org.springframework.boot.autoconfigure.web.server.reactive.ReactiveWebServerConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.tomcat.TomcatContextCustomizer;
@@ -32,6 +31,7 @@ import org.springframework.boot.tomcat.TomcatProtocolHandlerCustomizer;
import org.springframework.boot.tomcat.autoconfigure.TomcatServerProperties;
import org.springframework.boot.tomcat.autoconfigure.TomcatWebServerConfiguration;
import org.springframework.boot.tomcat.reactive.TomcatReactiveWebServerFactory;
+import org.springframework.boot.web.server.autoconfigure.reactive.ReactiveWebServerConfiguration;
import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
diff --git a/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/servlet/TomcatServletWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/servlet/TomcatServletWebServerAutoConfiguration.java
index 81dde22d307..23064bf5ab0 100644
--- a/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/servlet/TomcatServletWebServerAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/servlet/TomcatServletWebServerAutoConfiguration.java
@@ -29,9 +29,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.autoconfigure.condition.SearchStrategy;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
-import org.springframework.boot.autoconfigure.web.server.servlet.ForwardedHeaderFilterCustomizer;
-import org.springframework.boot.autoconfigure.web.server.servlet.ServletWebServerConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.tomcat.TomcatContextCustomizer;
@@ -39,6 +36,9 @@ import org.springframework.boot.tomcat.TomcatProtocolHandlerCustomizer;
import org.springframework.boot.tomcat.autoconfigure.TomcatServerProperties;
import org.springframework.boot.tomcat.autoconfigure.TomcatWebServerConfiguration;
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
+import org.springframework.boot.web.server.autoconfigure.servlet.ForwardedHeaderFilterCustomizer;
+import org.springframework.boot.web.server.autoconfigure.servlet.ServletWebServerConfiguration;
import org.springframework.boot.web.server.servlet.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
diff --git a/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerFactoryCustomizerTests.java
index e1d93b73523..9c0cf2f457a 100644
--- a/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerFactoryCustomizerTests.java
+++ b/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/TomcatWebServerFactoryCustomizerTests.java
@@ -32,8 +32,6 @@ import org.apache.coyote.http2.Http2Protocol;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
-import org.springframework.boot.autoconfigure.web.ServerProperties.ForwardHeadersStrategy;
import org.springframework.boot.context.properties.bind.Bindable;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
@@ -42,6 +40,8 @@ import org.springframework.boot.testsupport.web.servlet.DirtiesUrlFactories;
import org.springframework.boot.tomcat.TomcatWebServer;
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.WebServer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties.ForwardHeadersStrategy;
import org.springframework.mock.env.MockEnvironment;
import org.springframework.test.context.support.TestPropertySourceUtils;
import org.springframework.util.unit.DataSize;
diff --git a/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/reactive/TomcatReactiveWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/reactive/TomcatReactiveWebServerAutoConfigurationTests.java
index 19bf03b83c9..76fa89ea0fd 100644
--- a/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/reactive/TomcatReactiveWebServerAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/reactive/TomcatReactiveWebServerAutoConfigurationTests.java
@@ -24,7 +24,6 @@ import org.apache.catalina.connector.Connector;
import org.apache.catalina.startup.Tomcat;
import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.web.server.reactive.AbstractReactiveWebServerAutoConfigurationTests;
import org.springframework.boot.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.tomcat.TomcatContextCustomizer;
import org.springframework.boot.tomcat.TomcatProtocolHandlerCustomizer;
@@ -32,6 +31,7 @@ import org.springframework.boot.tomcat.TomcatWebServer;
import org.springframework.boot.tomcat.reactive.TomcatReactiveWebServerFactory;
import org.springframework.boot.web.server.WebServer;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.reactive.AbstractReactiveWebServerAutoConfigurationTests;
import org.springframework.boot.web.server.reactive.context.ReactiveWebServerApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/servlet/TomcatServletWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/servlet/TomcatServletWebServerAutoConfigurationTests.java
index a51f7dbcf7f..d705934002c 100644
--- a/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/servlet/TomcatServletWebServerAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-tomcat/src/test/java/org/springframework/boot/tomcat/autoconfigure/servlet/TomcatServletWebServerAutoConfigurationTests.java
@@ -21,12 +21,12 @@ import org.apache.catalina.Context;
import org.apache.catalina.connector.Connector;
import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.web.server.servlet.AbstractServletWebServerAutoConfigurationTests;
import org.springframework.boot.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.tomcat.TomcatContextCustomizer;
import org.springframework.boot.tomcat.TomcatProtocolHandlerCustomizer;
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.servlet.AbstractServletWebServerAutoConfigurationTests;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerConfiguration.java
index 41963e0b2ac..140ff0f6ead 100644
--- a/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerConfiguration.java
+++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerConfiguration.java
@@ -17,7 +17,7 @@
package org.springframework.boot.undertow.autoconfigure;
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeployment;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
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-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizer.java
index 7103e30a966..3a462652f54 100644
--- a/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizer.java
+++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizer.java
@@ -29,12 +29,12 @@ import io.undertow.UndertowOptions;
import org.xnio.Option;
import org.xnio.Options;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
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.autoconfigure.ServerProperties;
import org.springframework.core.Ordered;
import org.springframework.core.env.Environment;
import org.springframework.util.Assert;
diff --git a/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfiguration.java
index 2c92487d208..f9c03f58570 100644
--- a/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfiguration.java
@@ -24,12 +24,12 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
-import org.springframework.boot.autoconfigure.web.server.reactive.ReactiveWebServerConfiguration;
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.autoconfigure.reactive.ReactiveWebServerConfiguration;
import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
diff --git a/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfiguration.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfiguration.java
index 1bf0cb32bc7..96ced988ebd 100644
--- a/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfiguration.java
@@ -32,13 +32,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.thread.Threading;
-import org.springframework.boot.autoconfigure.web.server.servlet.ServletWebServerConfiguration;
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.autoconfigure.servlet.ServletWebServerConfiguration;
import org.springframework.boot.web.server.servlet.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizer.java
index 1e0dbba9c2c..c354bff5795 100644
--- a/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizer.java
+++ b/spring-boot-project/spring-boot-undertow/src/main/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerFactoryCustomizer.java
@@ -16,10 +16,10 @@
package org.springframework.boot.undertow.autoconfigure.servlet;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
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.autoconfigure.ServerProperties;
/**
* {@link WebServerFactoryCustomizer} to apply {@link ServerProperties} to Undertow
diff --git a/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizerTests.java
index db5c0e66d9b..0c3bcc668a6 100644
--- a/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizerTests.java
+++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/UndertowWebServerFactoryCustomizerTests.java
@@ -29,12 +29,12 @@ import org.xnio.Option;
import org.xnio.OptionMap;
import org.xnio.Options;
-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.undertow.ConfigurableUndertowWebServerFactory;
import org.springframework.boot.undertow.UndertowBuilderCustomizer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
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-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfigurationTests.java
index 0c994e2b4e1..28367095253 100644
--- a/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/reactive/UndertowReactiveWebServerAutoConfigurationTests.java
@@ -19,11 +19,11 @@ 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.autoconfigure.reactive.AbstractReactiveWebServerAutoConfigurationTests;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfigurationTests.java
index d509684f8b8..c4ac22794c7 100644
--- a/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-undertow/src/test/java/org/springframework/boot/undertow/autoconfigure/servlet/UndertowServletWebServerAutoConfigurationTests.java
@@ -21,11 +21,11 @@ import io.undertow.servlet.api.DeploymentInfo;
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.autoconfigure.servlet.AbstractServletWebServerAutoConfigurationTests;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-boot-project/spring-boot-web-server/build.gradle b/spring-boot-project/spring-boot-web-server/build.gradle
index b275e06877e..899954de7d0 100644
--- a/spring-boot-project/spring-boot-web-server/build.gradle
+++ b/spring-boot-project/spring-boot-web-server/build.gradle
@@ -18,6 +18,7 @@
plugins {
id "java-library"
id "java-test-fixtures"
+ id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.deployed"
id "org.springframework.boot.optional-dependencies"
}
@@ -28,10 +29,12 @@ dependencies {
api(project(":spring-boot-project:spring-boot"))
api("org.springframework:spring-web")
+ optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("io.projectreactor:reactor-core")
optional("jakarta.servlet:jakarta.servlet-api")
optional("org.springframework:spring-test")
+ testFixturesCompileOnly(project(":spring-boot-project:spring-boot-test"))
testFixturesCompileOnly(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testFixturesCompileOnly("io.projectreactor:reactor-test")
testFixturesCompileOnly("io.projectreactor.netty:reactor-netty-http")
@@ -40,10 +43,13 @@ dependencies {
testFixturesCompileOnly("org.eclipse.jetty.http2:jetty-http2-client")
testFixturesCompileOnly("org.eclipse.jetty.http2:jetty-http2-client-transport")
testFixturesCompileOnly("jakarta.servlet:jakarta.servlet-api")
+ testFixturesCompileOnly("jakarta.websocket:jakarta.websocket-api")
+ testFixturesCompileOnly("jakarta.websocket:jakarta.websocket-client-api")
testFixturesCompileOnly("org.mockito:mockito-core")
testFixturesCompileOnly("org.springframework:spring-tx")
testFixturesCompileOnly("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("org.apache.tomcat.embed:tomcat-embed-core")
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/ServerProperties.java
similarity index 98%
rename from spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
rename to spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/ServerProperties.java
index cf968d301c0..518a9e36003 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
+++ b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/ServerProperties.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web;
+package org.springframework.boot.web.server.autoconfigure;
import java.net.InetAddress;
import java.nio.charset.Charset;
@@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
+import org.springframework.boot.autoconfigure.web.ErrorProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.boot.convert.DurationUnit;
diff --git a/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/package-info.java b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/package-info.java
new file mode 100644
index 00000000000..13a8a376f6b
--- /dev/null
+++ b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2012-present the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Classes related to the auto-configuration of a web server.
+ */
+package org.springframework.boot.web.server.autoconfigure;
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/ReactiveWebServerConfiguration.java b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/reactive/ReactiveWebServerConfiguration.java
similarity index 96%
rename from spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/ReactiveWebServerConfiguration.java
rename to spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/reactive/ReactiveWebServerConfiguration.java
index cebcf0133b8..7dd622f3869 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/ReactiveWebServerConfiguration.java
+++ b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/reactive/ReactiveWebServerConfiguration.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web.server.reactive;
+package org.springframework.boot.web.server.autoconfigure.reactive;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
@@ -25,10 +25,10 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostProcessor;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
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/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/ReactiveWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/reactive/ReactiveWebServerFactoryCustomizer.java
similarity index 95%
rename from spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/ReactiveWebServerFactoryCustomizer.java
rename to spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/reactive/ReactiveWebServerFactoryCustomizer.java
index 0117687a2d0..cbd0a4f67e7 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/ReactiveWebServerFactoryCustomizer.java
+++ b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/reactive/ReactiveWebServerFactoryCustomizer.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web.server.reactive;
+package org.springframework.boot.web.server.autoconfigure.reactive;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.reactive.ConfigurableReactiveWebServerFactory;
import org.springframework.core.Ordered;
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/package-info.java b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/reactive/package-info.java
similarity index 91%
rename from spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/package-info.java
rename to spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/reactive/package-info.java
index 1c13c2545eb..f70ff6a6cc2 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/reactive/package-info.java
+++ b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/reactive/package-info.java
@@ -17,4 +17,4 @@
/**
* Classes related to the auto-configuration of a reactive web server.
*/
-package org.springframework.boot.autoconfigure.web.server.reactive;
+package org.springframework.boot.web.server.autoconfigure.reactive;
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/ForwardedHeaderFilterCustomizer.java b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/ForwardedHeaderFilterCustomizer.java
similarity index 94%
rename from spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/ForwardedHeaderFilterCustomizer.java
rename to spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/ForwardedHeaderFilterCustomizer.java
index fd7c84b9883..b8044a9e3e8 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/ForwardedHeaderFilterCustomizer.java
+++ b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/ForwardedHeaderFilterCustomizer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web.server.servlet;
+package org.springframework.boot.web.server.autoconfigure.servlet;
import org.springframework.web.filter.ForwardedHeaderFilter;
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/ServletWebServerConfiguration.java b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/ServletWebServerConfiguration.java
similarity index 97%
rename from spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/ServletWebServerConfiguration.java
rename to spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/ServletWebServerConfiguration.java
index e853a53acc4..79aea0a6654 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/ServletWebServerConfiguration.java
+++ b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/ServletWebServerConfiguration.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web.server.servlet;
+package org.springframework.boot.web.server.autoconfigure.servlet;
import jakarta.servlet.DispatcherType;
@@ -27,11 +27,11 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingFilterBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.error.ErrorPageRegistrarBeanPostProcessor;
import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostProcessor;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.servlet.CookieSameSiteSupplier;
import org.springframework.boot.web.server.servlet.WebListenerRegistrar;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/ServletWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/ServletWebServerFactoryCustomizer.java
similarity index 96%
rename from spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/ServletWebServerFactoryCustomizer.java
rename to spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/ServletWebServerFactoryCustomizer.java
index 7cdfa479fee..7da8fd14ceb 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/ServletWebServerFactoryCustomizer.java
+++ b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/ServletWebServerFactoryCustomizer.java
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web.server.servlet;
+package org.springframework.boot.web.server.autoconfigure.servlet;
import java.util.Collections;
import java.util.List;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory;
import org.springframework.boot.web.server.servlet.CookieSameSiteSupplier;
import org.springframework.boot.web.server.servlet.WebListenerRegistrar;
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/package-info.java b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/package-info.java
similarity index 91%
rename from spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/package-info.java
rename to spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/package-info.java
index eff2a877be9..6514d77336c 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/server/servlet/package-info.java
+++ b/spring-boot-project/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/autoconfigure/servlet/package-info.java
@@ -17,4 +17,4 @@
/**
* Classes related to the auto-configuration of a servlet web server.
*/
-package org.springframework.boot.autoconfigure.web.server.servlet;
+package org.springframework.boot.web.server.autoconfigure.servlet;
diff --git a/spring-boot-project/spring-boot-web-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-web-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json
new file mode 100644
index 00000000000..f04fdaac14b
--- /dev/null
+++ b/spring-boot-project/spring-boot-web-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -0,0 +1,217 @@
+{
+ "properties": [
+ {
+ "name": "server.connection-timeout",
+ "type": "java.time.Duration",
+ "deprecation": {
+ "reason": "Each server behaves differently. Use server specific properties instead.",
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.error.include-binding-errors",
+ "description": "When to include \"errors\" attribute.",
+ "defaultValue": "never"
+ },
+ {
+ "name": "server.error.include-exception",
+ "description": "Include the \"exception\" attribute.",
+ "defaultValue": false
+ },
+ {
+ "name": "server.error.include-message",
+ "description": "When to include the \"message\" attribute.",
+ "defaultValue": "never"
+ },
+ {
+ "name": "server.error.include-path",
+ "description": "When to include the \"path\" attribute.",
+ "defaultValue": "always"
+ },
+ {
+ "name": "server.error.include-stacktrace",
+ "description": "When to include the \"trace\" attribute.",
+ "defaultValue": "never"
+ },
+ {
+ "name": "server.error.path",
+ "description": "Path of the error controller",
+ "defaultValue": "/error"
+ },
+ {
+ "name": "server.error.whitelabel.enabled",
+ "description": "Whether to enable the default error page displayed in browsers in case of a server error.",
+ "defaultValue": true
+ },
+ {
+ "name": "server.max-http-header-size",
+ "deprecation": {
+ "replacement": "server.max-http-request-header-size",
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.max-http-post-size",
+ "type": "java.lang.Integer",
+ "description": "Maximum size in bytes of the HTTP post content.",
+ "defaultValue": 0,
+ "deprecation": {
+ "reason": "Use dedicated property for each container.",
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.port",
+ "defaultValue": 8080
+ },
+ {
+ "name": "server.reactive.session.cookie.domain",
+ "description": "Domain for the cookie."
+ },
+ {
+ "name": "server.reactive.session.cookie.http-only",
+ "description": "Whether to use \"HttpOnly\" cookies for the cookie."
+ },
+ {
+ "name": "server.reactive.session.cookie.max-age",
+ "description": "Maximum age of the cookie. If a duration suffix is not specified, seconds will be used. A positive value indicates when the cookie expires relative to the current time. A value of 0 means the cookie should expire immediately. A negative value means no \"Max-Age\"."
+ },
+ {
+ "name": "server.reactive.session.cookie.name",
+ "description": "Name for the cookie."
+ },
+ {
+ "name": "server.reactive.session.cookie.partitioned",
+ "description": "Whether the generated cookie carries the Partitioned attribute."
+ },
+ {
+ "name": "server.reactive.session.cookie.path",
+ "description": "Path of the cookie."
+ },
+ {
+ "name": "server.reactive.session.cookie.same-site",
+ "description": "SameSite setting for the cookie."
+ },
+ {
+ "name": "server.reactive.session.cookie.secure",
+ "description": "Whether to always mark the cookie as secure."
+ },
+ {
+ "name": "server.servlet.encoding.charset",
+ "type": "java.nio.charset.Charset",
+ "description": "Charset of HTTP requests and responses. Added to the Content-Type header if not set explicitly.",
+ "deprecation": {
+ "replacement": "spring.servlet.encoding.charset",
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.servlet.encoding.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Whether to enable http encoding support.",
+ "defaultValue": true,
+ "deprecation": {
+ "replacement": "spring.servlet.encoding.enabled",
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.servlet.encoding.force",
+ "type": "java.lang.Boolean",
+ "description": "Whether to force the encoding to the configured charset on HTTP requests and responses.",
+ "defaultValue": false,
+ "deprecation": {
+ "replacement": "spring.servlet.encoding.force",
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.servlet.encoding.force-request",
+ "type": "java.lang.Boolean",
+ "description": "Whether to force the encoding to the configured charset on HTTP requests. Defaults to true when force has not been specified.",
+ "defaultValue": true,
+ "deprecation": {
+ "replacement": "spring.servlet.encoding.force-request",
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.servlet.encoding.force-response",
+ "type": "java.lang.Boolean",
+ "description": "Whether to force the encoding to the configured charset on HTTP responses.",
+ "defaultValue": false,
+ "deprecation": {
+ "replacement": "spring.servlet.encoding.force-response",
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.servlet.jsp.class-name",
+ "description": "Class name of the servlet to use for JSPs. If registered is true and this class\n\t * is on the classpath then it will be registered.",
+ "defaultValue": "org.apache.jasper.servlet.JspServlet"
+ },
+ {
+ "name": "server.servlet.jsp.init-parameters",
+ "description": "Init parameters used to configure the JSP servlet."
+ },
+ {
+ "name": "server.servlet.path",
+ "type": "java.lang.String",
+ "description": "Path of the main dispatcher servlet.",
+ "defaultValue": "/",
+ "deprecation": {
+ "replacement": "spring.mvc.servlet.path",
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.servlet.session.cookie.comment",
+ "description": "Comment for the cookie.",
+ "deprecation": {
+ "level": "error"
+ }
+ },
+ {
+ "name": "server.ssl.protocol",
+ "description": "SSL protocol to use.",
+ "defaultValue": "TLS"
+ },
+ {
+ "name": "server.ssl.server-name-bundles",
+ "description": "Mapping of host names to SSL bundles for SNI configuration."
+ },
+ {
+ "name": "server.ssl.trust-certificate",
+ "description": "Path to a PEM-encoded SSL certificate authority file."
+ },
+ {
+ "name": "server.ssl.trust-certificate-private-key",
+ "description": "Path to a PEM-encoded private key file for the SSL certificate authority."
+ },
+ {
+ "name": "server.ssl.trust-store",
+ "description": "Trust store that holds SSL certificates."
+ },
+ {
+ "name": "server.ssl.trust-store-password",
+ "description": "Password used to access the trust store."
+ },
+ {
+ "name": "server.ssl.trust-store-provider",
+ "description": "Provider for the trust store."
+ },
+ {
+ "name": "server.ssl.trust-store-type",
+ "description": "Type of the trust store."
+ },
+ {
+ "name": "server.use-forward-headers",
+ "type": "java.lang.Boolean",
+ "deprecation": {
+ "reason": "Replaced to support additional strategies.",
+ "replacement": "server.forward-headers-strategy",
+ "level": "error"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java b/spring-boot-project/spring-boot-web-server/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
similarity index 97%
rename from spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
rename to spring-boot-project/spring-boot-web-server/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
index cb37a9ebb99..b9d18c722bf 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
+++ b/spring-boot-project/spring-boot-web-server/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
@@ -26,9 +26,9 @@ import org.springframework.boot.context.properties.bind.Bindable;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySource;
import org.springframework.boot.context.properties.source.MapConfigurationPropertySource;
-import org.springframework.boot.testsupport.web.servlet.DirtiesUrlFactories;
import org.springframework.boot.web.server.MimeMappings;
import org.springframework.boot.web.server.MimeMappings.Mapping;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.util.unit.DataSize;
import static org.assertj.core.api.Assertions.assertThat;
@@ -51,7 +51,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Lasse Wulff
* @author Moritz Halbritter
*/
-@DirtiesUrlFactories
class ServerPropertiesTests {
private final ServerProperties properties = new ServerProperties();
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/ReactiveWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/autoconfigure/reactive/ReactiveWebServerFactoryCustomizerTests.java
similarity index 95%
rename from spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/ReactiveWebServerFactoryCustomizerTests.java
rename to spring-boot-project/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/autoconfigure/reactive/ReactiveWebServerFactoryCustomizerTests.java
index 61db5c90af6..519c7b47384 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/server/reactive/ReactiveWebServerFactoryCustomizerTests.java
+++ b/spring-boot-project/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/autoconfigure/reactive/ReactiveWebServerFactoryCustomizerTests.java
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web.server.reactive;
+package org.springframework.boot.web.server.autoconfigure.reactive;
import java.net.InetAddress;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.ssl.DefaultSslBundleRegistry;
import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.server.Shutdown;
import org.springframework.boot.web.server.Ssl;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.reactive.ConfigurableReactiveWebServerFactory;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/ServletWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/autoconfigure/servlet/ServletWebServerFactoryCustomizerTests.java
similarity index 98%
rename from spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/ServletWebServerFactoryCustomizerTests.java
rename to spring-boot-project/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/autoconfigure/servlet/ServletWebServerFactoryCustomizerTests.java
index ec5255b2897..3e00d736aed 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/server/servlet/ServletWebServerFactoryCustomizerTests.java
+++ b/spring-boot-project/spring-boot-web-server/src/test/java/org/springframework/boot/web/server/autoconfigure/servlet/ServletWebServerFactoryCustomizerTests.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web.server.servlet;
+package org.springframework.boot.web.server.autoconfigure.servlet;
import java.io.File;
import java.nio.charset.StandardCharsets;
@@ -26,7 +26,6 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
-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.ConfigurationPropertySource;
@@ -35,6 +34,7 @@ import org.springframework.boot.web.server.Cookie;
import org.springframework.boot.web.server.MimeMappings;
import org.springframework.boot.web.server.Shutdown;
import org.springframework.boot.web.server.Ssl;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory;
import org.springframework.boot.web.server.servlet.Jsp;
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/testFixtures/java/org/springframework/boot/autoconfigure/web/server/reactive/AbstractReactiveWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-web-server/src/testFixtures/java/org/springframework/boot/web/server/autoconfigure/reactive/AbstractReactiveWebServerAutoConfigurationTests.java
similarity index 99%
rename from spring-boot-project/spring-boot-autoconfigure/src/testFixtures/java/org/springframework/boot/autoconfigure/web/server/reactive/AbstractReactiveWebServerAutoConfigurationTests.java
rename to spring-boot-project/spring-boot-web-server/src/testFixtures/java/org/springframework/boot/web/server/autoconfigure/reactive/AbstractReactiveWebServerAutoConfigurationTests.java
index cb19ac5c38d..57f7e316ce7 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/testFixtures/java/org/springframework/boot/autoconfigure/web/server/reactive/AbstractReactiveWebServerAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-web-server/src/testFixtures/java/org/springframework/boot/web/server/autoconfigure/reactive/AbstractReactiveWebServerAutoConfigurationTests.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web.server.reactive;
+package org.springframework.boot.web.server.autoconfigure.reactive;
import org.junit.jupiter.api.Test;
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/testFixtures/java/org/springframework/boot/autoconfigure/web/server/servlet/AbstractServletWebServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-web-server/src/testFixtures/java/org/springframework/boot/web/server/autoconfigure/servlet/AbstractServletWebServerAutoConfigurationTests.java
similarity index 99%
rename from spring-boot-project/spring-boot-autoconfigure/src/testFixtures/java/org/springframework/boot/autoconfigure/web/server/servlet/AbstractServletWebServerAutoConfigurationTests.java
rename to spring-boot-project/spring-boot-web-server/src/testFixtures/java/org/springframework/boot/web/server/autoconfigure/servlet/AbstractServletWebServerAutoConfigurationTests.java
index 8708c67e494..0ca5f657f23 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/testFixtures/java/org/springframework/boot/autoconfigure/web/server/servlet/AbstractServletWebServerAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-web-server/src/testFixtures/java/org/springframework/boot/web/server/autoconfigure/servlet/AbstractServletWebServerAutoConfigurationTests.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.boot.autoconfigure.web.server.servlet;
+package org.springframework.boot.web.server.autoconfigure.servlet;
import java.io.IOException;
diff --git a/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfiguration.java
index 8c6236f430c..209e237b1b0 100644
--- a/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfiguration.java
@@ -36,7 +36,6 @@ import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguratio
import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders;
import org.springframework.boot.autoconfigure.thread.Threading;
import org.springframework.boot.autoconfigure.web.ConditionalOnEnabledResourceChain;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.WebProperties;
import org.springframework.boot.autoconfigure.web.WebProperties.Resources;
import org.springframework.boot.autoconfigure.web.WebResourcesRuntimeHints;
@@ -47,6 +46,7 @@ import org.springframework.boot.convert.ApplicationConversionService;
import org.springframework.boot.http.codec.CodecCustomizer;
import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration;
import org.springframework.boot.validation.autoconfigure.ValidatorAdapter;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.webflux.autoconfigure.WebFluxProperties.Format;
import org.springframework.boot.webflux.filter.OrderedHiddenHttpMethodFilter;
import org.springframework.context.ApplicationContext;
diff --git a/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebSessionIdResolverAutoConfiguration.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebSessionIdResolverAutoConfiguration.java
index 2999758ee3d..4326c9fd579 100644
--- a/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebSessionIdResolverAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/WebSessionIdResolverAutoConfiguration.java
@@ -23,11 +23,11 @@ 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.condition.ConditionalOnWebApplication.Type;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.web.server.Cookie;
import org.springframework.boot.web.server.Cookie.SameSite;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.http.ResponseCookie.ResponseCookieBuilder;
import org.springframework.util.StringUtils;
diff --git a/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/ErrorWebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/ErrorWebFluxAutoConfiguration.java
index 7d605b76b6b..0c3dd28267c 100644
--- a/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/ErrorWebFluxAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/autoconfigure/error/ErrorWebFluxAutoConfiguration.java
@@ -23,9 +23,9 @@ 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.condition.SearchStrategy;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.WebProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration;
import org.springframework.boot.webflux.error.DefaultErrorAttributes;
import org.springframework.boot.webflux.error.ErrorAttributes;
diff --git a/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java
index 760f27be371..356049579b8 100644
--- a/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/WebFluxAutoConfigurationTests.java
@@ -47,7 +47,6 @@ import org.junit.jupiter.params.provider.ValueSource;
import org.springframework.aop.support.AopUtils;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.http.codec.CodecCustomizer;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.ContextConsumer;
@@ -56,6 +55,7 @@ import org.springframework.boot.testsupport.classpath.resources.WithResource;
import org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration;
import org.springframework.boot.validation.autoconfigure.ValidatorAdapter;
import org.springframework.boot.web.context.reactive.ReactiveWebApplicationContext;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.reactive.MockReactiveWebServerFactory;
import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration.WebFluxConfig;
import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfigurationTests.OrderedControllerAdviceBeansConfiguration.HighestOrderedControllerAdvice;
diff --git a/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerIntegrationTests.java b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerIntegrationTests.java
index 8606b986e6e..92746e71e8a 100644
--- a/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerIntegrationTests.java
+++ b/spring-boot-project/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/autoconfigure/error/DefaultErrorWebExceptionHandlerIntegrationTests.java
@@ -32,7 +32,6 @@ import reactor.core.scheduler.Schedulers;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.WebProperties;
import org.springframework.boot.mustache.autoconfigure.MustacheAutoConfiguration;
import org.springframework.boot.reactor.netty.autoconfigure.NettyReactiveWebServerAutoConfiguration;
@@ -43,6 +42,7 @@ import org.springframework.boot.test.system.OutputCaptureExtension;
import org.springframework.boot.testsupport.classpath.resources.WithResource;
import org.springframework.boot.web.error.ErrorAttributeOptions;
import org.springframework.boot.web.error.ErrorAttributeOptions.Include;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.webflux.autoconfigure.HttpHandlerAutoConfiguration;
import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration;
import org.springframework.boot.webflux.error.DefaultErrorAttributes;
diff --git a/spring-boot-project/spring-boot-webmvc/build.gradle b/spring-boot-project/spring-boot-webmvc/build.gradle
index f6edde76887..ad010f0565b 100644
--- a/spring-boot-project/spring-boot-webmvc/build.gradle
+++ b/spring-boot-project/spring-boot-webmvc/build.gradle
@@ -36,6 +36,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-validation"))
+ optional(project(":spring-boot-project:spring-boot-web-server"))
testImplementation(project(":spring-boot-project:spring-boot-freemarker"))
testImplementation(project(":spring-boot-project:spring-boot-test"))
diff --git a/spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/autoconfigure/error/ErrorMvcAutoConfiguration.java b/spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/autoconfigure/error/ErrorMvcAutoConfiguration.java
index a5d9e945eeb..e2d2152cb44 100644
--- a/spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/autoconfigure/error/ErrorMvcAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/autoconfigure/error/ErrorMvcAutoConfiguration.java
@@ -44,13 +44,13 @@ import org.springframework.boot.autoconfigure.condition.SearchStrategy;
import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider;
import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.WebProperties;
import org.springframework.boot.autoconfigure.web.WebProperties.Resources;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.error.ErrorPage;
import org.springframework.boot.web.error.ErrorPageRegistrar;
import org.springframework.boot.web.error.ErrorPageRegistry;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletPath;
import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration;
import org.springframework.boot.webmvc.autoconfigure.WebMvcProperties;
@@ -84,7 +84,7 @@ import org.springframework.web.util.HtmlUtils;
// Load before the main WebMvcAutoConfiguration so that the error View is available
@AutoConfiguration(before = WebMvcAutoConfiguration.class)
@ConditionalOnWebApplication(type = Type.SERVLET)
-@ConditionalOnClass({ Servlet.class, DispatcherServlet.class })
+@ConditionalOnClass({ Servlet.class, DispatcherServlet.class, ServerProperties.class })
@EnableConfigurationProperties({ ServerProperties.class, WebMvcProperties.class })
public class ErrorMvcAutoConfiguration {
diff --git a/spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/autoconfigure/error/BasicErrorControllerIntegrationTests.java b/spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/autoconfigure/error/BasicErrorControllerIntegrationTests.java
index ecac27fd278..48ab4582b46 100755
--- a/spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/autoconfigure/error/BasicErrorControllerIntegrationTests.java
+++ b/spring-boot-project/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/autoconfigure/error/BasicErrorControllerIntegrationTests.java
@@ -39,13 +39,13 @@ import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration;
import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.testsupport.classpath.resources.WithResource;
import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration;
import org.springframework.boot.web.error.ErrorAttributeOptions;
import org.springframework.boot.web.error.ErrorAttributeOptions.Include;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.test.client.TestRestTemplate;
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;
import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration;
diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-property-validation/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-property-validation/build.gradle
index ec03a2eb06e..6aee7aadb2e 100644
--- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-property-validation/build.gradle
+++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-property-validation/build.gradle
@@ -26,4 +26,5 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
+ testImplementation(project(":spring-boot-project:spring-boot-web-server"))
}
diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-property-validation/src/test/java/smoketest/propertyvalidation/SamplePropertyValidationApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-property-validation/src/test/java/smoketest/propertyvalidation/SamplePropertyValidationApplicationTests.java
index c085ffdf550..cda7195683e 100644
--- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-property-validation/src/test/java/smoketest/propertyvalidation/SamplePropertyValidationApplicationTests.java
+++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-property-validation/src/test/java/smoketest/propertyvalidation/SamplePropertyValidationApplicationTests.java
@@ -20,9 +20,9 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.bind.validation.BindValidationException;
import org.springframework.boot.test.util.TestPropertyValues;
+import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/src/checkstyle/import-control.xml b/src/checkstyle/import-control.xml
index 5935334b2a2..2ff31bf9c91 100644
--- a/src/checkstyle/import-control.xml
+++ b/src/checkstyle/import-control.xml
@@ -120,6 +120,13 @@
+
+
+
+
+
+
+