Move web server auto-configure classes into spring-boot-web-server

Closes gh-46145
This commit is contained in:
Andy Wilkinson 2025-05-07 13:49:13 +01:00
parent 9fba39fc45
commit bb80db8a28
89 changed files with 358 additions and 434 deletions

View File

@ -48,7 +48,6 @@ import org.springframework.util.Assert;
*/ */
@AutoConfiguration @AutoConfiguration
@AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE) @AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE)
@EnableConfigurationProperties(ManagementServerProperties.class)
public class ManagementContextAutoConfiguration { public class ManagementContextAutoConfiguration {
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ -101,6 +100,7 @@ public class ManagementContextAutoConfiguration {
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ConditionalOnManagementPort(ManagementPortType.DIFFERENT) @ConditionalOnManagementPort(ManagementPortType.DIFFERENT)
@EnableConfigurationProperties(ManagementServerProperties.class)
static class DifferentManagementContextConfiguration { static class DifferentManagementContextConfiguration {
@Bean @Bean

View File

@ -18,10 +18,10 @@ package org.springframework.boot.actuate.autoconfigure.web.server;
import java.net.InetAddress; import java.net.InetAddress;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.boot.web.server.Ssl; import org.springframework.boot.web.server.Ssl;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**

View File

@ -23,12 +23,12 @@ import java.util.List;
import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.ListableBeanFactory; import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.util.LambdaSafe; import org.springframework.boot.util.LambdaSafe;
import org.springframework.boot.web.server.ConfigurableWebServerFactory; import org.springframework.boot.web.server.ConfigurableWebServerFactory;
import org.springframework.boot.web.server.Ssl; import org.springframework.boot.web.server.Ssl;
import org.springframework.boot.web.server.WebServerFactory; import org.springframework.boot.web.server.WebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
/** /**

View File

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.web.servlet;
import org.springframework.beans.factory.ListableBeanFactory; import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties; import org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementWebServerFactoryCustomizer; 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.boot.web.server.servlet.ConfigurableServletWebServerFactory;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@ -24,9 +24,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; 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.error.ErrorPage;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.ConfigurableServletWebServerFactory;
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter; import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;

View File

@ -316,15 +316,8 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
ServletSecurityContext securityContext = new ServletSecurityContext(request); ServletSecurityContext securityContext = new ServletSecurityContext(request);
ProducibleOperationArgumentResolver producibleOperationArgumentResolver = new ProducibleOperationArgumentResolver( ProducibleOperationArgumentResolver producibleOperationArgumentResolver = new ProducibleOperationArgumentResolver(
() -> headers.get("Accept")); () -> 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, InvocationContext invocationContext = new InvocationContext(securityContext, arguments,
serverNamespaceArgumentResolver, producibleOperationArgumentResolver); serverNamespaceArgumentResolver(request), producibleOperationArgumentResolver);
return handleResult(this.operation.invoke(invocationContext), HttpMethod.valueOf(request.getMethod())); return handleResult(this.operation.invoke(invocationContext), HttpMethod.valueOf(request.getMethod()));
} }
catch (InvalidEndpointRequestException ex) { 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 @Override
public String toString() { public String toString() {
return "Actuator web endpoint '" + this.operation.getId() + "'"; return "Actuator web endpoint '" + this.operation.getId() + "'";

View File

@ -26,7 +26,6 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
import org.springframework.boot.test.util.TestPropertyValues; 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.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration;
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory; import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; 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.web.server.servlet.context.AnnotationConfigServletWebServerApplicationContext;
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

View File

@ -27,7 +27,6 @@ description = "Spring Boot AutoConfigure"
dependencies { dependencies {
api(project(":spring-boot-project:spring-boot")) api(project(":spring-boot-project:spring-boot"))
api(project(":spring-boot-project:spring-boot-web-server"))
optional("com.github.ben-manes.caffeine:caffeine") optional("com.github.ben-manes.caffeine:caffeine")
optional("org.aspectj:aspectjweaver") optional("org.aspectj:aspectjweaver")
@ -40,16 +39,11 @@ dependencies {
testFixturesCompileOnly(project(":spring-boot-project:spring-boot-test")) testFixturesCompileOnly(project(":spring-boot-project:spring-boot-test"))
testFixturesCompileOnly(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) testFixturesCompileOnly(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testFixturesCompileOnly("javax.cache:cache-api") 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")))
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-tools:spring-boot-test-support"))
testImplementation(project(":spring-boot-project:spring-boot-test")) testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot"))) 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("ch.qos.logback:logback-classic")
testImplementation("com.fasterxml.jackson.core:jackson-databind") testImplementation("com.fasterxml.jackson.core:jackson-databind")
testImplementation("io.projectreactor:reactor-core") testImplementation("io.projectreactor:reactor-core")

View File

@ -1,292 +1,6 @@
{ {
"groups": [], "groups": [],
"properties": [ "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", "name": "spring.aop.auto",
"type": "java.lang.Boolean", "type": "java.lang.Boolean",

View File

@ -17,16 +17,12 @@
package org.springframework.boot.autoconfigure.condition; package org.springframework.boot.autoconfigure.condition;
import org.junit.jupiter.api.Test; 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.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner; 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.Bean;
import org.springframework.context.annotation.Configuration; 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.assertThat;
import static org.assertj.core.api.Assertions.entry; import static org.assertj.core.api.Assertions.entry;
@ -47,8 +43,7 @@ class ConditionalOnNotWebApplicationTests {
@Test @Test
void testNotWebApplicationWithReactiveContext() { void testNotWebApplicationWithReactiveContext() {
new ReactiveWebApplicationContextRunner() new ReactiveWebApplicationContextRunner().withUserConfiguration(NotWebApplicationConfiguration.class)
.withUserConfiguration(ReactiveApplicationConfig.class, NotWebApplicationConfiguration.class)
.run((context) -> assertThat(context).doesNotHaveBean(String.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"))); .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) @Configuration(proxyBeanMethods = false)
@ConditionalOnNotWebApplication @ConditionalOnNotWebApplication
static class NotWebApplicationConfiguration { static class NotWebApplicationConfiguration {

View File

@ -18,18 +18,14 @@ package org.springframework.boot.autoconfigure.condition;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import reactor.core.publisher.Mono;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.web.context.reactive.AnnotationConfigReactiveWebApplicationContext; import org.springframework.boot.web.context.reactive.AnnotationConfigReactiveWebApplicationContext;
import org.springframework.boot.web.context.servlet.AnnotationConfigServletWebApplicationContext; 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.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.http.server.reactive.HttpHandler;
import org.springframework.mock.web.MockServletContext; import org.springframework.mock.web.MockServletContext;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
@ -116,16 +112,6 @@ class ConditionalOnWebApplicationTests {
return "reactive"; return "reactive";
} }
@Bean
ReactiveWebServerFactory reactiveWebServerFactory() {
return new MockReactiveWebServerFactory();
}
@Bean
HttpHandler httpHandler() {
return (request, response) -> Mono.empty();
}
} }
} }

View File

@ -58,6 +58,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-r2dbc")) optional(project(":spring-boot-project:spring-boot-r2dbc"))
optional(project(":spring-boot-project:spring-boot-reactor")) optional(project(":spring-boot-project:spring-boot-reactor"))
optional(project(":spring-boot-project:spring-boot-security")) optional(project(":spring-boot-project:spring-boot-security"))
optional(project(":spring-boot-project:spring-boot-web-server"))
optional("io.r2dbc:r2dbc-spi") optional("io.r2dbc:r2dbc-spi")
optional("jakarta.servlet:jakarta.servlet-api") optional("jakarta.servlet:jakarta.servlet-api")
optional("org.apache.derby:derbytools") optional("org.apache.derby:derbytools")

View File

@ -28,8 +28,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProp
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.devtools.remote.server.AccessManager; import org.springframework.boot.devtools.remote.server.AccessManager;
import org.springframework.boot.devtools.remote.server.Dispatcher; 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.HttpRestartServer;
import org.springframework.boot.devtools.restart.server.HttpRestartServerHandler; import org.springframework.boot.devtools.restart.server.HttpRestartServerHandler;
import org.springframework.boot.devtools.restart.server.SourceDirectoryUrlFilter; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; 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") @AutoConfiguration(afterName = "org.springframework.boot.security.autoconfigure.servlet.SecurityAutoConfiguration")
@ConditionalOnEnabledDevTools @ConditionalOnEnabledDevTools
@ConditionalOnProperty("spring.devtools.remote.secret") @ConditionalOnProperty("spring.devtools.remote.secret")
@ConditionalOnClass({ Filter.class, ServerHttpRequest.class }) @ConditionalOnClass({ Filter.class, ServerHttpRequest.class, ServerProperties.class })
@Import(RemoteDevtoolsSecurityConfiguration.class) @Import(RemoteDevtoolsSecurityConfiguration.class)
@EnableConfigurationProperties({ ServerProperties.class, DevToolsProperties.class }) @EnableConfigurationProperties({ ServerProperties.class, DevToolsProperties.class })
public class RemoteDevToolsAutoConfiguration { public class RemoteDevToolsAutoConfiguration {

View File

@ -17,8 +17,8 @@
package org.springframework.boot.devtools.autoconfigure; package org.springframework.boot.devtools.autoconfigure;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; 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.security.autoconfigure.SecurityProperties;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;

View File

@ -231,6 +231,7 @@ dependencies {
configurationProperties(project(path: ":spring-boot-project:spring-boot-tx", configuration: "configurationPropertiesMetadata")) 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-undertow", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-webflux", 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-webmvc", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-webservices", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-webservices", configuration: "configurationPropertiesMetadata"))

View File

@ -26,7 +26,6 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.boot.autoconfigure.AutoConfigurations; 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.http.converter.autoconfigure.JacksonHttpMessageConvertersConfiguration.MappingJackson2HttpMessageConverterConfiguration;
import org.springframework.boot.test.context.FilteredClassLoader; import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.assertj.AssertableApplicationContext; 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() { private ApplicationContextRunner allOptionsRunner() {
return this.contextRunner.withBean(Gson.class) return this.contextRunner.withBean(Gson.class)
.withBean(ObjectMapper.class) .withBean(ObjectMapper.class)

View File

@ -19,9 +19,9 @@ package org.springframework.boot.jetty.autoconfigure;
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeployment; import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeployment;
import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading; import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading;
import org.springframework.boot.autoconfigure.thread.Threading; 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.reactive.JettyReactiveWebServerAutoConfiguration;
import org.springframework.boot.jetty.autoconfigure.servlet.JettyServletWebServerAutoConfiguration; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;

View File

@ -32,12 +32,12 @@ import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.RequestLogWriter; import org.eclipse.jetty.server.RequestLogWriter;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.cloud.CloudPlatform; import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory; import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory;
import org.springframework.boot.jetty.autoconfigure.JettyServerProperties.Accesslog; import org.springframework.boot.jetty.autoconfigure.JettyServerProperties.Accesslog;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;

View File

@ -26,12 +26,12 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jetty.JettyServerCustomizer; import org.springframework.boot.jetty.JettyServerCustomizer;
import org.springframework.boot.jetty.autoconfigure.JettyServerProperties; import org.springframework.boot.jetty.autoconfigure.JettyServerProperties;
import org.springframework.boot.jetty.autoconfigure.JettyWebServerConfiguration; import org.springframework.boot.jetty.autoconfigure.JettyWebServerConfiguration;
import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory; 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.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -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;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.autoconfigure.condition.SearchStrategy; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jetty.JettyServerCustomizer; import org.springframework.boot.jetty.JettyServerCustomizer;
import org.springframework.boot.jetty.autoconfigure.JettyServerProperties; import org.springframework.boot.jetty.autoconfigure.JettyServerProperties;
import org.springframework.boot.jetty.autoconfigure.JettyWebServerConfiguration; import org.springframework.boot.jetty.autoconfigure.JettyWebServerConfiguration;
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.boot.web.server.servlet.ServletWebServerFactory;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -41,14 +41,14 @@ import org.eclipse.jetty.util.thread.ThreadPool;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; 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.Bindable;
import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySources; import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory; import org.springframework.boot.jetty.ConfigurableJettyWebServerFactory;
import org.springframework.boot.jetty.JettyWebServer; import org.springframework.boot.jetty.JettyWebServer;
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; 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.mock.env.MockEnvironment;
import org.springframework.test.context.support.TestPropertySourceUtils; import org.springframework.test.context.support.TestPropertySourceUtils;
import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.util.ReflectionTestUtils;

View File

@ -22,12 +22,12 @@ import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.StatisticsHandler; import org.eclipse.jetty.server.handler.StatisticsHandler;
import org.junit.jupiter.api.Test; 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.JettyServerCustomizer;
import org.springframework.boot.jetty.JettyWebServer; import org.springframework.boot.jetty.JettyWebServer;
import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory; import org.springframework.boot.jetty.reactive.JettyReactiveWebServerFactory;
import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.server.WebServer;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.boot.web.server.reactive.context.ReactiveWebServerApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -24,10 +24,10 @@ import org.eclipse.jetty.server.Server;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.BeanDefinition; 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.JettyServerCustomizer;
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory; import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.AbstractFilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletContextInitializer; import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

View File

@ -23,13 +23,13 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory; import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.reactor.netty.NettyRouteProvider; import org.springframework.boot.reactor.netty.NettyRouteProvider;
import org.springframework.boot.reactor.netty.NettyServerCustomizer; import org.springframework.boot.reactor.netty.NettyServerCustomizer;
import org.springframework.boot.reactor.netty.autoconfigure.ReactorNettyConfigurations.ReactorResourceFactoryConfiguration; 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.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;

View File

@ -20,11 +20,11 @@ import java.time.Duration;
import io.netty.channel.ChannelOption; import io.netty.channel.ChannelOption;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.cloud.CloudPlatform; import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory; import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;

View File

@ -19,10 +19,10 @@ package org.springframework.boot.reactor.netty.autoconfigure;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import reactor.netty.http.server.HttpServer; 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.NettyReactiveWebServerFactory;
import org.springframework.boot.reactor.netty.NettyServerCustomizer; import org.springframework.boot.reactor.netty.NettyServerCustomizer;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -30,10 +30,10 @@ import reactor.netty.http.Http2SettingsSpec;
import reactor.netty.http.server.HttpRequestDecoderSpec; import reactor.netty.http.server.HttpRequestDecoderSpec;
import reactor.netty.http.server.HttpServer; 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.context.properties.source.ConfigurationPropertySources;
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory; import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.reactor.netty.NettyServerCustomizer; import org.springframework.boot.reactor.netty.NettyServerCustomizer;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.mock.env.MockEnvironment; import org.springframework.mock.env.MockEnvironment;
import org.springframework.util.unit.DataSize; import org.springframework.util.unit.DataSize;

View File

@ -43,6 +43,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-reactor")) optional(project(":spring-boot-project:spring-boot-reactor"))
optional(project(":spring-boot-project:spring-boot-rsocket")) optional(project(":spring-boot-project:spring-boot-rsocket"))
optional(project(":spring-boot-project:spring-boot-webmvc")) optional(project(":spring-boot-project:spring-boot-webmvc"))
optional(project(":spring-boot-project:spring-boot-web-server"))
optional("jakarta.servlet:jakarta.servlet-api") optional("jakarta.servlet:jakarta.servlet-api")
optional("org.springframework:spring-messaging") optional("org.springframework:spring-messaging")
optional("org.springframework:spring-webflux") optional("org.springframework:spring-webflux")

View File

@ -21,8 +21,8 @@ import java.time.Duration;
import org.assertj.core.api.AssertDelegateTarget; import org.assertj.core.api.AssertDelegateTarget;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.security.autoconfigure.StaticResourceLocation; import org.springframework.boot.security.autoconfigure.StaticResourceLocation;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.support.StaticApplicationContext; import org.springframework.context.support.StaticApplicationContext;
import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.http.server.reactive.ServerHttpResponse;

View File

@ -20,8 +20,8 @@ import jakarta.servlet.http.HttpServletRequest;
import org.assertj.core.api.AssertDelegateTarget; import org.assertj.core.api.AssertDelegateTarget;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.h2console.autoconfigure.H2ConsoleProperties; 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.MockHttpServletRequest;
import org.springframework.mock.web.MockServletContext; import org.springframework.mock.web.MockServletContext;
import org.springframework.security.web.util.matcher.RequestMatcher; import org.springframework.security.web.util.matcher.RequestMatcher;

View File

@ -32,14 +32,13 @@ dependencies {
api("org.springframework.session:spring-session-data-mongodb") api("org.springframework.session:spring-session-data-mongodb")
implementation(project(":spring-boot-project:spring-boot-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-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-webflux")) optional(project(":spring-boot-project:spring-boot-webflux"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-test")) 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-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-web-server")))
dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-session"))) dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-session")))
dockerTestImplementation("org.mongodb:mongodb-driver-reactivestreams") dockerTestImplementation("org.mongodb:mongodb-driver-reactivestreams")

View File

@ -25,7 +25,6 @@ import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.boot.autoconfigure.AutoConfigurations; 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.data.mongodb.autoconfigure.MongoDataAutoConfiguration;
import org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration; import org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration;
import org.springframework.boot.session.autoconfigure.AbstractSessionAutoConfigurationTests; 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.ContextConsumer;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.testsupport.container.TestImage; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.session.config.SessionRepositoryCustomizer; import org.springframework.session.config.SessionRepositoryCustomizer;

View File

@ -23,13 +23,13 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; 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.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration; import org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration;
import org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration; import org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration; import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionProperties; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;

View File

@ -32,14 +32,13 @@ dependencies {
api("org.springframework.session:spring-session-data-redis") api("org.springframework.session:spring-session-data-redis")
implementation(project(":spring-boot-project:spring-boot-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-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-webflux")) optional(project(":spring-boot-project:spring-boot-webflux"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-test")) 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-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-web-server")))
dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-session"))) dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-session")))
dockerTestImplementation("com.redis:testcontainers-redis") dockerTestImplementation("com.redis:testcontainers-redis")

View File

@ -28,7 +28,6 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import org.springframework.boot.autoconfigure.AutoConfigurations; 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.RedisAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisReactiveAutoConfiguration;
import org.springframework.boot.session.autoconfigure.AbstractReactiveSessionAutoConfigurationTests; 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.ContextConsumer;
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
import org.springframework.boot.testsupport.container.TestImage; 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.boot.webflux.autoconfigure.WebSessionIdResolverAutoConfiguration;
import org.springframework.data.redis.connection.ReactiveRedisConnection; import org.springframework.data.redis.connection.ReactiveRedisConnection;
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory; import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;

View File

@ -26,7 +26,6 @@ import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.boot.autoconfigure.AutoConfigurations; 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.context.properties.source.InvalidConfigurationPropertyValueException;
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.session.autoconfigure.AbstractSessionAutoConfigurationTests; 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.ContextConsumer;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.testsupport.container.TestImage; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnection; import org.springframework.data.redis.connection.RedisConnection;

View File

@ -24,7 +24,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; 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.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException; 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.data.redis.autoconfigure.RedisReactiveAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration; import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionProperties; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;

View File

@ -31,6 +31,7 @@ dependencies {
api("org.springframework.session:spring-session-hazelcast") api("org.springframework.session:spring-session-hazelcast")
implementation(project(":spring-boot-project:spring-boot-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")) optional(project(":spring-boot-project:spring-boot-autoconfigure"))

View File

@ -25,11 +25,11 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; 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.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration; import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionProperties; 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.Bean;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;

View File

@ -24,10 +24,10 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations; 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.AbstractSessionAutoConfigurationTests;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration; import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.session.FlushMode; import org.springframework.session.FlushMode;

View File

@ -31,6 +31,7 @@ dependencies {
api("org.springframework.session:spring-session-jdbc") api("org.springframework.session:spring-session-jdbc")
implementation(project(":spring-boot-project:spring-boot-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")) optional(project(":spring-boot-project:spring-boot-autoconfigure"))

View File

@ -26,13 +26,13 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; 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.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration; import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
import org.springframework.boot.session.autoconfigure.SessionProperties; import org.springframework.boot.session.autoconfigure.SessionProperties;
import org.springframework.boot.sql.autoconfigure.init.OnDatabaseInitializationCondition; import org.springframework.boot.sql.autoconfigure.init.OnDatabaseInitializationCondition;
import org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer; 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.Bean;
import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;

View File

@ -26,7 +26,6 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration; import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration; import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration; 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.sql.init.DatabaseInitializationSettings;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.testsupport.classpath.resources.WithResource; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;

View File

@ -30,6 +30,8 @@ dependencies {
api(project(":spring-boot-project:spring-boot")) api(project(":spring-boot-project:spring-boot"))
api("org.springframework.session:spring-session-core") 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(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("jakarta.servlet:jakarta.servlet-api") optional("jakarta.servlet:jakarta.servlet-api")
optional("org.springframework.security:spring-security-web") optional("org.springframework.security:spring-security-web")

View File

@ -27,11 +27,11 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; 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.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.web.server.Cookie; import org.springframework.boot.web.server.Cookie;
import org.springframework.boot.web.server.Cookie.SameSite; 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.Bean;
import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -24,9 +24,9 @@ import org.junit.jupiter.api.Test;
import org.mockito.InOrder; import org.mockito.InOrder;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner; 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.boot.web.servlet.AbstractFilterRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -23,9 +23,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; 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.EnableConfigurationProperties;
import org.springframework.boot.test.autoconfigure.web.reactive.WebTestClientAutoConfiguration; 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.web.server.test.client.reactive.WebTestClientBuilderCustomizer;
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletPath; import org.springframework.boot.webmvc.autoconfigure.DispatcherServletPath;
import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration;

View File

@ -22,9 +22,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeployment; import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeployment;
import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading; import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading;
import org.springframework.boot.autoconfigure.thread.Threading; 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.reactive.TomcatReactiveWebServerAutoConfiguration;
import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;

View File

@ -34,7 +34,6 @@ import org.apache.coyote.http2.Http2Protocol;
import org.springframework.boot.autoconfigure.web.ErrorProperties; import org.springframework.boot.autoconfigure.web.ErrorProperties;
import org.springframework.boot.autoconfigure.web.ErrorProperties.IncludeAttribute; 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.cloud.CloudPlatform;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.tomcat.ConfigurableTomcatWebServerFactory; 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.Remoteip;
import org.springframework.boot.tomcat.autoconfigure.TomcatServerProperties.UseApr; import org.springframework.boot.tomcat.autoconfigure.TomcatServerProperties.UseApr;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.util.Assert; import org.springframework.util.Assert;

View File

@ -24,7 +24,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.tomcat.TomcatConnectorCustomizer; import org.springframework.boot.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.tomcat.TomcatContextCustomizer; 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.TomcatServerProperties;
import org.springframework.boot.tomcat.autoconfigure.TomcatWebServerConfiguration; import org.springframework.boot.tomcat.autoconfigure.TomcatWebServerConfiguration;
import org.springframework.boot.tomcat.reactive.TomcatReactiveWebServerFactory; 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.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;

View File

@ -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;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.autoconfigure.condition.SearchStrategy; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.tomcat.TomcatConnectorCustomizer; import org.springframework.boot.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.tomcat.TomcatContextCustomizer; 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.TomcatServerProperties;
import org.springframework.boot.tomcat.autoconfigure.TomcatWebServerConfiguration; import org.springframework.boot.tomcat.autoconfigure.TomcatWebServerConfiguration;
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory; 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.boot.web.server.servlet.ServletWebServerFactory;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;

View File

@ -32,8 +32,6 @@ import org.apache.coyote.http2.Http2Protocol;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; 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.Bindable;
import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySources; 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.TomcatWebServer;
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory; import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.WebServer; 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.mock.env.MockEnvironment;
import org.springframework.test.context.support.TestPropertySourceUtils; import org.springframework.test.context.support.TestPropertySourceUtils;
import org.springframework.util.unit.DataSize; import org.springframework.util.unit.DataSize;

View File

@ -24,7 +24,6 @@ import org.apache.catalina.connector.Connector;
import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.Tomcat;
import org.junit.jupiter.api.Test; 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.TomcatConnectorCustomizer;
import org.springframework.boot.tomcat.TomcatContextCustomizer; import org.springframework.boot.tomcat.TomcatContextCustomizer;
import org.springframework.boot.tomcat.TomcatProtocolHandlerCustomizer; 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.tomcat.reactive.TomcatReactiveWebServerFactory;
import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.server.WebServer;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.boot.web.server.reactive.context.ReactiveWebServerApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -21,12 +21,12 @@ import org.apache.catalina.Context;
import org.apache.catalina.connector.Connector; import org.apache.catalina.connector.Connector;
import org.junit.jupiter.api.Test; 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.TomcatConnectorCustomizer;
import org.springframework.boot.tomcat.TomcatContextCustomizer; import org.springframework.boot.tomcat.TomcatContextCustomizer;
import org.springframework.boot.tomcat.TomcatProtocolHandlerCustomizer; import org.springframework.boot.tomcat.TomcatProtocolHandlerCustomizer;
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory; import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -17,7 +17,7 @@
package org.springframework.boot.undertow.autoconfigure; package org.springframework.boot.undertow.autoconfigure;
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWarDeployment; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;

View File

@ -29,12 +29,12 @@ import io.undertow.UndertowOptions;
import org.xnio.Option; import org.xnio.Option;
import org.xnio.Options; import org.xnio.Options;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.cloud.CloudPlatform; import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.undertow.ConfigurableUndertowWebServerFactory; import org.springframework.boot.undertow.ConfigurableUndertowWebServerFactory;
import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties.Accesslog; import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties.Accesslog;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.util.Assert; import org.springframework.util.Assert;

View File

@ -24,12 +24,12 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.undertow.UndertowBuilderCustomizer; import org.springframework.boot.undertow.UndertowBuilderCustomizer;
import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties; import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties;
import org.springframework.boot.undertow.autoconfigure.UndertowWebServerConfiguration; import org.springframework.boot.undertow.autoconfigure.UndertowWebServerConfiguration;
import org.springframework.boot.undertow.reactive.UndertowReactiveWebServerFactory; 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.boot.web.server.reactive.ReactiveWebServerFactory;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;

View File

@ -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.ConditionalOnWebApplication.Type;
import org.springframework.boot.autoconfigure.condition.SearchStrategy; import org.springframework.boot.autoconfigure.condition.SearchStrategy;
import org.springframework.boot.autoconfigure.thread.Threading; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.undertow.UndertowBuilderCustomizer; import org.springframework.boot.undertow.UndertowBuilderCustomizer;
import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties; import org.springframework.boot.undertow.autoconfigure.UndertowServerProperties;
import org.springframework.boot.undertow.autoconfigure.UndertowWebServerConfiguration; import org.springframework.boot.undertow.autoconfigure.UndertowWebServerConfiguration;
import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer; import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer;
import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; 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.boot.web.server.servlet.ServletWebServerFactory;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -16,10 +16,10 @@
package org.springframework.boot.undertow.autoconfigure.servlet; 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.autoconfigure.UndertowServerProperties;
import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
/** /**
* {@link WebServerFactoryCustomizer} to apply {@link ServerProperties} to Undertow * {@link WebServerFactoryCustomizer} to apply {@link ServerProperties} to Undertow

View File

@ -29,12 +29,12 @@ import org.xnio.Option;
import org.xnio.OptionMap; import org.xnio.OptionMap;
import org.xnio.Options; 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.Bindable;
import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySources; import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
import org.springframework.boot.undertow.ConfigurableUndertowWebServerFactory; import org.springframework.boot.undertow.ConfigurableUndertowWebServerFactory;
import org.springframework.boot.undertow.UndertowBuilderCustomizer; import org.springframework.boot.undertow.UndertowBuilderCustomizer;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.mock.env.MockEnvironment; import org.springframework.mock.env.MockEnvironment;
import org.springframework.test.context.support.TestPropertySourceUtils; import org.springframework.test.context.support.TestPropertySourceUtils;
import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.util.ReflectionTestUtils;

View File

@ -19,11 +19,11 @@ package org.springframework.boot.undertow.autoconfigure.reactive;
import io.undertow.Undertow.Builder; import io.undertow.Undertow.Builder;
import org.junit.jupiter.api.Test; 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.UndertowBuilderCustomizer;
import org.springframework.boot.undertow.reactive.UndertowReactiveWebServerFactory; import org.springframework.boot.undertow.reactive.UndertowReactiveWebServerFactory;
import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer; import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -21,11 +21,11 @@ import io.undertow.servlet.api.DeploymentInfo;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations; 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.UndertowBuilderCustomizer;
import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer; import org.springframework.boot.undertow.servlet.UndertowDeploymentInfoCustomizer;
import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory; import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;

View File

@ -18,6 +18,7 @@
plugins { plugins {
id "java-library" id "java-library"
id "java-test-fixtures" id "java-test-fixtures"
id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.deployed" id "org.springframework.boot.deployed"
id "org.springframework.boot.optional-dependencies" id "org.springframework.boot.optional-dependencies"
} }
@ -28,10 +29,12 @@ dependencies {
api(project(":spring-boot-project:spring-boot")) api(project(":spring-boot-project:spring-boot"))
api("org.springframework:spring-web") api("org.springframework:spring-web")
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("io.projectreactor:reactor-core") optional("io.projectreactor:reactor-core")
optional("jakarta.servlet:jakarta.servlet-api") optional("jakarta.servlet:jakarta.servlet-api")
optional("org.springframework:spring-test") 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(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testFixturesCompileOnly("io.projectreactor:reactor-test") testFixturesCompileOnly("io.projectreactor:reactor-test")
testFixturesCompileOnly("io.projectreactor.netty:reactor-netty-http") 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")
testFixturesCompileOnly("org.eclipse.jetty.http2:jetty-http2-client-transport") testFixturesCompileOnly("org.eclipse.jetty.http2:jetty-http2-client-transport")
testFixturesCompileOnly("jakarta.servlet:jakarta.servlet-api") 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.mockito:mockito-core")
testFixturesCompileOnly("org.springframework:spring-tx") testFixturesCompileOnly("org.springframework:spring-tx")
testFixturesCompileOnly("org.springframework:spring-webflux") 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(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot"))) testImplementation(testFixtures(project(":spring-boot-project:spring-boot")))
testImplementation("org.apache.tomcat.embed:tomcat-embed-core") testImplementation("org.apache.tomcat.embed:tomcat-embed-core")

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.web; package org.springframework.boot.web.server.autoconfigure;
import java.net.InetAddress; import java.net.InetAddress;
import java.nio.charset.Charset; import java.nio.charset.Charset;
@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import org.springframework.boot.autoconfigure.web.ErrorProperties;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.boot.convert.DurationUnit; import org.springframework.boot.convert.DurationUnit;

View File

@ -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;

View File

@ -14,7 +14,7 @@
* limitations under the License. * 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.BeansException;
import org.springframework.beans.factory.BeanFactory; 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.beans.factory.support.RootBeanDefinition;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.ssl.SslBundles; import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostProcessor; 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.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;

View File

@ -14,12 +14,12 @@
* limitations under the License. * 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.context.properties.PropertyMapper;
import org.springframework.boot.ssl.SslBundles; import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.boot.web.server.reactive.ConfigurableReactiveWebServerFactory;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;

View File

@ -17,4 +17,4 @@
/** /**
* Classes related to the auto-configuration of a reactive web server. * 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;

View File

@ -14,7 +14,7 @@
* limitations under the License. * 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; import org.springframework.web.filter.ForwardedHeaderFilter;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.web.server.servlet; package org.springframework.boot.web.server.autoconfigure.servlet;
import jakarta.servlet.DispatcherType; 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.beans.factory.support.RootBeanDefinition;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingFilterBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingFilterBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.ssl.SslBundles; import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.error.ErrorPageRegistrarBeanPostProcessor; import org.springframework.boot.web.error.ErrorPageRegistrarBeanPostProcessor;
import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostProcessor; 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.CookieSameSiteSupplier;
import org.springframework.boot.web.server.servlet.WebListenerRegistrar; import org.springframework.boot.web.server.servlet.WebListenerRegistrar;
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;

View File

@ -14,15 +14,15 @@
* limitations under the License. * 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.Collections;
import java.util.List; import java.util.List;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.ssl.SslBundles; import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.server.WebServerFactoryCustomizer; 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.ConfigurableServletWebServerFactory;
import org.springframework.boot.web.server.servlet.CookieSameSiteSupplier; import org.springframework.boot.web.server.servlet.CookieSameSiteSupplier;
import org.springframework.boot.web.server.servlet.WebListenerRegistrar; import org.springframework.boot.web.server.servlet.WebListenerRegistrar;

View File

@ -17,4 +17,4 @@
/** /**
* Classes related to the auto-configuration of a servlet web server. * 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;

View File

@ -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"
}
}
]
}

View File

@ -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.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySource; import org.springframework.boot.context.properties.source.ConfigurationPropertySource;
import org.springframework.boot.context.properties.source.MapConfigurationPropertySource; 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;
import org.springframework.boot.web.server.MimeMappings.Mapping; import org.springframework.boot.web.server.MimeMappings.Mapping;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.util.unit.DataSize; import org.springframework.util.unit.DataSize;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
@ -51,7 +51,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Lasse Wulff * @author Lasse Wulff
* @author Moritz Halbritter * @author Moritz Halbritter
*/ */
@DirtiesUrlFactories
class ServerPropertiesTests { class ServerPropertiesTests {
private final ServerProperties properties = new ServerProperties(); private final ServerProperties properties = new ServerProperties();

View File

@ -14,18 +14,18 @@
* limitations under the License. * 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 java.net.InetAddress;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.ssl.DefaultSslBundleRegistry; import org.springframework.boot.ssl.DefaultSslBundleRegistry;
import org.springframework.boot.ssl.SslBundles; import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.web.server.Shutdown; import org.springframework.boot.web.server.Shutdown;
import org.springframework.boot.web.server.Ssl; import org.springframework.boot.web.server.Ssl;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.boot.web.server.reactive.ConfigurableReactiveWebServerFactory; import org.springframework.boot.web.server.reactive.ConfigurableReactiveWebServerFactory;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;

View File

@ -14,7 +14,7 @@
* limitations under the License. * 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.io.File;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
@ -26,7 +26,6 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor; 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.Bindable;
import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySource; 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.MimeMappings;
import org.springframework.boot.web.server.Shutdown; import org.springframework.boot.web.server.Shutdown;
import org.springframework.boot.web.server.Ssl; 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.ConfigurableServletWebServerFactory;
import org.springframework.boot.web.server.servlet.Jsp; import org.springframework.boot.web.server.servlet.Jsp;

View File

@ -14,7 +14,7 @@
* limitations under the License. * 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; import org.junit.jupiter.api.Test;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.web.server.servlet; package org.springframework.boot.web.server.autoconfigure.servlet;
import java.io.IOException; import java.io.IOException;

View File

@ -36,7 +36,6 @@ import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguratio
import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders; import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders;
import org.springframework.boot.autoconfigure.thread.Threading; import org.springframework.boot.autoconfigure.thread.Threading;
import org.springframework.boot.autoconfigure.web.ConditionalOnEnabledResourceChain; 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;
import org.springframework.boot.autoconfigure.web.WebProperties.Resources; import org.springframework.boot.autoconfigure.web.WebProperties.Resources;
import org.springframework.boot.autoconfigure.web.WebResourcesRuntimeHints; 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.CodecCustomizer;
import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration; import org.springframework.boot.http.codec.autoconfigure.CodecsAutoConfiguration;
import org.springframework.boot.validation.autoconfigure.ValidatorAdapter; 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.autoconfigure.WebFluxProperties.Format;
import org.springframework.boot.webflux.filter.OrderedHiddenHttpMethodFilter; import org.springframework.boot.webflux.filter.OrderedHiddenHttpMethodFilter;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;

View File

@ -23,11 +23,11 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; 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.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.web.server.Cookie; import org.springframework.boot.web.server.Cookie;
import org.springframework.boot.web.server.Cookie.SameSite; 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.Bean;
import org.springframework.http.ResponseCookie.ResponseCookieBuilder; import org.springframework.http.ResponseCookie.ResponseCookieBuilder;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@ -23,9 +23,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.SearchStrategy; 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.autoconfigure.web.WebProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties; 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.autoconfigure.WebFluxAutoConfiguration;
import org.springframework.boot.webflux.error.DefaultErrorAttributes; import org.springframework.boot.webflux.error.DefaultErrorAttributes;
import org.springframework.boot.webflux.error.ErrorAttributes; import org.springframework.boot.webflux.error.ErrorAttributes;

View File

@ -47,7 +47,6 @@ import org.junit.jupiter.params.provider.ValueSource;
import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.AopUtils;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration; 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.http.codec.CodecCustomizer;
import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.context.runner.ContextConsumer; 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.ValidationAutoConfiguration;
import org.springframework.boot.validation.autoconfigure.ValidatorAdapter; import org.springframework.boot.validation.autoconfigure.ValidatorAdapter;
import org.springframework.boot.web.context.reactive.ReactiveWebApplicationContext; 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.web.server.reactive.MockReactiveWebServerFactory;
import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration.WebFluxConfig; import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration.WebFluxConfig;
import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfigurationTests.OrderedControllerAdviceBeansConfiguration.HighestOrderedControllerAdvice; import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfigurationTests.OrderedControllerAdviceBeansConfiguration.HighestOrderedControllerAdvice;

View File

@ -32,7 +32,6 @@ import reactor.core.scheduler.Schedulers;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; 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.autoconfigure.web.WebProperties;
import org.springframework.boot.mustache.autoconfigure.MustacheAutoConfiguration; import org.springframework.boot.mustache.autoconfigure.MustacheAutoConfiguration;
import org.springframework.boot.reactor.netty.autoconfigure.NettyReactiveWebServerAutoConfiguration; 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.testsupport.classpath.resources.WithResource;
import org.springframework.boot.web.error.ErrorAttributeOptions; import org.springframework.boot.web.error.ErrorAttributeOptions;
import org.springframework.boot.web.error.ErrorAttributeOptions.Include; 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.HttpHandlerAutoConfiguration;
import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration; import org.springframework.boot.webflux.autoconfigure.WebFluxAutoConfiguration;
import org.springframework.boot.webflux.error.DefaultErrorAttributes; import org.springframework.boot.webflux.error.DefaultErrorAttributes;

View File

@ -36,6 +36,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-autoconfigure")) optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-validation")) 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-freemarker"))
testImplementation(project(":spring-boot-project:spring-boot-test")) testImplementation(project(":spring-boot-project:spring-boot-test"))

View File

@ -44,13 +44,13 @@ import org.springframework.boot.autoconfigure.condition.SearchStrategy;
import org.springframework.boot.autoconfigure.condition.SpringBootCondition; import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider; import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider;
import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders; 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;
import org.springframework.boot.autoconfigure.web.WebProperties.Resources; import org.springframework.boot.autoconfigure.web.WebProperties.Resources;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.error.ErrorPage; import org.springframework.boot.web.error.ErrorPage;
import org.springframework.boot.web.error.ErrorPageRegistrar; import org.springframework.boot.web.error.ErrorPageRegistrar;
import org.springframework.boot.web.error.ErrorPageRegistry; 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.DispatcherServletPath;
import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration;
import org.springframework.boot.webmvc.autoconfigure.WebMvcProperties; 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 // Load before the main WebMvcAutoConfiguration so that the error View is available
@AutoConfiguration(before = WebMvcAutoConfiguration.class) @AutoConfiguration(before = WebMvcAutoConfiguration.class)
@ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass({ Servlet.class, DispatcherServlet.class }) @ConditionalOnClass({ Servlet.class, DispatcherServlet.class, ServerProperties.class })
@EnableConfigurationProperties({ ServerProperties.class, WebMvcProperties.class }) @EnableConfigurationProperties({ ServerProperties.class, WebMvcProperties.class })
public class ErrorMvcAutoConfiguration { public class ErrorMvcAutoConfiguration {

View File

@ -39,13 +39,13 @@ import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; 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.freemarker.autoconfigure.FreeMarkerAutoConfiguration;
import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.boot.testsupport.classpath.resources.WithResource;
import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration; import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration;
import org.springframework.boot.web.error.ErrorAttributeOptions; import org.springframework.boot.web.error.ErrorAttributeOptions;
import org.springframework.boot.web.error.ErrorAttributeOptions.Include; 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.web.server.test.client.TestRestTemplate;
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;
import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration; import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration;

View File

@ -26,4 +26,5 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) 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-starters:spring-boot-starter-test"))
testImplementation(project(":spring-boot-project:spring-boot-web-server"))
} }

View File

@ -20,9 +20,9 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException; 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.context.properties.bind.validation.BindValidationException;
import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;

View File

@ -120,6 +120,13 @@
<allow pkg="org.springframework.boot.web.error" /> <allow pkg="org.springframework.boot.web.error" />
<allow pkg="org.springframework.boot.web.server" /> <allow pkg="org.springframework.boot.web.server" />
<disallow pkg="org.springframework.context" /> <disallow pkg="org.springframework.context" />
<subpackage name="autoconfigure">
<allow pkg="org.springframework.context" />
<subpackage name="servlet">
<allow pkg="jakarta.servlet" />
<allow pkg="org.springframework.boot.web.servlet" />
</subpackage>
</subpackage>
<subpackage name="context"> <subpackage name="context">
<allow pkg="org.springframework.context" /> <allow pkg="org.springframework.context" />
</subpackage> </subpackage>