Skip to content

Commit 2d55c8f

Browse files
committed
Move web server auto-configure classes into spring-boot-web-server
1 parent e42ef73 commit 2d55c8f

File tree

90 files changed

+478
-471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+478
-471
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextAutoConfiguration.java

+3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
import org.springframework.boot.autoconfigure.AutoConfiguration;
2323
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
2424
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
25+
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2526
import org.springframework.boot.context.properties.EnableConfigurationProperties;
27+
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
2628
import org.springframework.context.annotation.Bean;
2729
import org.springframework.context.annotation.Configuration;
2830
import org.springframework.context.support.AbstractApplicationContext;
@@ -44,6 +46,7 @@
4446
*/
4547
@AutoConfiguration
4648
@AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE)
49+
@ConditionalOnClass(ServerProperties.class)
4750
@EnableConfigurationProperties(ManagementServerProperties.class)
4851
public class ManagementContextAutoConfiguration {
4952

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
import java.net.InetAddress;
2020

21-
import org.springframework.boot.autoconfigure.web.ServerProperties;
2221
import org.springframework.boot.context.properties.ConfigurationProperties;
2322
import org.springframework.boot.context.properties.NestedConfigurationProperty;
2423
import org.springframework.boot.web.server.Ssl;
24+
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
2525
import org.springframework.util.StringUtils;
2626

2727
/**

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementWebServerFactoryCustomizer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
import org.springframework.beans.factory.BeanFactoryUtils;
2424
import org.springframework.beans.factory.ListableBeanFactory;
2525
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
26-
import org.springframework.boot.autoconfigure.web.ServerProperties;
2726
import org.springframework.boot.util.LambdaSafe;
2827
import org.springframework.boot.web.server.ConfigurableWebServerFactory;
2928
import org.springframework.boot.web.server.Ssl;
3029
import org.springframework.boot.web.server.WebServerFactory;
3130
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
31+
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
3232
import org.springframework.core.Ordered;
3333

3434
/**

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementWebServerFactoryCustomizer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import org.springframework.beans.factory.ListableBeanFactory;
2020
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties;
2121
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementWebServerFactoryCustomizer;
22-
import org.springframework.boot.autoconfigure.web.ServerProperties;
22+
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
2323
import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory;
2424
import org.springframework.util.StringUtils;
2525

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/WebMvcEndpointChildContextConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2525
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
2626
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
27-
import org.springframework.boot.autoconfigure.web.ServerProperties;
2827
import org.springframework.boot.web.error.ErrorPage;
2928
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
29+
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
3030
import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory;
3131
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
3232
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;

spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/servlet/HttpEncodingAutoConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2323
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2424
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
25-
import org.springframework.boot.autoconfigure.web.ServerProperties;
2625
import org.springframework.boot.context.properties.EnableConfigurationProperties;
2726
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
27+
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
2828
import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory;
2929
import org.springframework.boot.web.server.servlet.Encoding;
3030
import org.springframework.boot.web.servlet.filter.OrderedCharacterEncodingFilter;
@@ -43,7 +43,7 @@
4343
@AutoConfiguration
4444
@EnableConfigurationProperties(ServerProperties.class)
4545
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
46-
@ConditionalOnClass(CharacterEncodingFilter.class)
46+
@ConditionalOnClass({ CharacterEncodingFilter.class, ServerProperties.class })
4747
@ConditionalOnBooleanProperty(name = "server.servlet.encoding.enabled", matchIfMissing = true)
4848
public class HttpEncodingAutoConfiguration {
4949

spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.junit.jupiter.params.provider.Arguments;
2727
import org.junit.jupiter.params.provider.MethodSource;
2828

29-
import org.springframework.boot.autoconfigure.web.ServerProperties;
3029
import org.springframework.boot.context.properties.EnableConfigurationProperties;
3130
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
3231
import org.springframework.boot.test.util.TestPropertyValues;
@@ -35,6 +34,7 @@
3534
import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration;
3635
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
3736
import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory;
37+
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
3838
import org.springframework.boot.web.server.servlet.context.AnnotationConfigServletWebServerApplicationContext;
3939
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;
4040
import org.springframework.context.annotation.Bean;

spring-boot-project/spring-boot-autoconfigure/build.gradle

-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ description = "Spring Boot AutoConfigure"
1111

1212
dependencies {
1313
api(project(":spring-boot-project:spring-boot"))
14-
api(project(":spring-boot-project:spring-boot-web-server"))
1514

1615
optional("org.aspectj:aspectjweaver")
1716
optional("jakarta.persistence:jakarta.persistence-api")
@@ -23,15 +22,10 @@ dependencies {
2322
testFixturesCompileOnly(project(":spring-boot-project:spring-boot-test"))
2423
testFixturesCompileOnly(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
2524
testFixturesCompileOnly("javax.cache:cache-api")
26-
testFixturesCompileOnly("jakarta.websocket:jakarta.websocket-api")
27-
testFixturesCompileOnly("jakarta.websocket:jakarta.websocket-client-api")
28-
29-
testFixturesImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
3025

3126
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
3227
testImplementation(project(":spring-boot-project:spring-boot-test"))
3328
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
34-
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
3529
testImplementation("ch.qos.logback:logback-classic")
3630
testImplementation("com.fasterxml.jackson.core:jackson-databind")
3731
testImplementation("io.projectreactor:reactor-core")

0 commit comments

Comments
 (0)