Skip to content

Commit a9bc099

Browse files
committed
Move Tomcat auto-configuration into spring-boot-tomcat
1 parent a6b2b2f commit a9bc099

File tree

104 files changed

+295
-434
lines changed

Some content is hidden

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

104 files changed

+295
-434
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2626
import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty;
2727
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
28-
import org.springframework.boot.autoconfigure.web.servlet.ConditionalOnMissingFilterBean;
28+
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingFilterBean;
2929
import org.springframework.boot.web.servlet.FilterRegistrationBean;
3030
import org.springframework.context.annotation.Bean;
3131
import org.springframework.context.annotation.Configuration;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2727
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
29-
import org.springframework.boot.autoconfigure.web.server.reactive.tomcat.TomcatReactiveWebServerAutoConfiguration;
30-
import org.springframework.boot.autoconfigure.web.server.tomcat.TomcatWebServerConfiguration;
29+
import org.springframework.boot.tomcat.autoconfigure.TomcatWebServerConfiguration;
30+
import org.springframework.boot.tomcat.reactive.autoconfigure.TomcatReactiveWebServerAutoConfiguration;
3131
import org.springframework.boot.web.server.reactive.ReactiveWebServerFactory;
3232
import org.springframework.context.annotation.Bean;
3333

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2727
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
29-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
30-
import org.springframework.boot.autoconfigure.web.server.tomcat.TomcatWebServerConfiguration;
29+
import org.springframework.boot.tomcat.autoconfigure.TomcatWebServerConfiguration;
30+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
3131
import org.springframework.boot.web.server.servlet.ServletWebServerFactory;
3232
import org.springframework.context.annotation.Bean;
3333

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/jersey/JerseyWebEndpointIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
import org.springframework.boot.actuate.autoconfigure.web.jersey.JerseySameManagementContextConfiguration;
2828
import org.springframework.boot.autoconfigure.AutoConfigurations;
2929
import org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration;
30-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3130
import org.springframework.boot.test.context.FilteredClassLoader;
3231
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
32+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
3333
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
3434
import org.springframework.context.annotation.Bean;
3535
import org.springframework.context.annotation.Configuration;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyEndpointAccessIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
import org.springframework.boot.autoconfigure.AutoConfigurations;
3434
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
3535
import org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration;
36-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3736
import org.springframework.boot.test.context.FilteredClassLoader;
3837
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
3938
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
39+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
4040
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
4141
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
4242
import org.springframework.http.HttpMethod;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyEndpointIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
3535
import org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration;
3636
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
37-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3837
import org.springframework.boot.test.context.FilteredClassLoader;
3938
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
39+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
4040
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
4141
import org.springframework.context.annotation.Bean;
4242
import org.springframework.context.annotation.Configuration;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/JerseyHealthEndpointAdditionalPathIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
import org.springframework.boot.autoconfigure.AutoConfigurations;
2727
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
2828
import org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration;
29-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3029
import org.springframework.boot.test.context.FilteredClassLoader;
3130
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
3231
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
32+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
3333
import org.springframework.boot.web.context.ServerPortInfoApplicationContextInitializer;
3434
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
3535
import org.springframework.web.context.ConfigurableWebApplicationContext;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointAccessIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
import org.springframework.boot.autoconfigure.AutoConfigurations;
3535
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
3636
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
37-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3837
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
3938
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
4039
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
4140
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
41+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
4242
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
4343
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
4444
import org.springframework.http.HttpMethod;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointExposureIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
import org.springframework.boot.autoconfigure.AutoConfigurations;
3838
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
3939
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
40-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
4140
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
4241
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
4342
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
4443
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
44+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
4545
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
4646
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
4747
import org.springframework.context.annotation.Bean;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcHealthEndpointAdditionalPathIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
import org.springframework.boot.autoconfigure.AutoConfigurations;
2727
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
2828
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
29-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3029
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
3130
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
3231
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
3332
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
33+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
3434
import org.springframework.boot.web.context.ServerPortInfoApplicationContextInitializer;
3535
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
3636
import org.springframework.web.context.ConfigurableWebApplicationContext;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/jersey/JerseyServerMetricsAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
import org.springframework.boot.autoconfigure.AutoConfigurations;
3535
import org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration;
3636
import org.springframework.boot.autoconfigure.jersey.ResourceConfigCustomizer;
37-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3837
import org.springframework.boot.test.context.FilteredClassLoader;
3938
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
4039
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
4140
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
41+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
4242
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
4343
import org.springframework.context.annotation.Bean;
4444
import org.springframework.context.annotation.Configuration;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/test/MetricsIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@
5050
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
5151
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
5252
import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration;
53-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
5453
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
5554
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
5655
import org.springframework.boot.test.context.SpringBootTest;
5756
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
5857
import org.springframework.boot.test.web.client.TestRestTemplate;
58+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
5959
import org.springframework.boot.web.client.RestTemplateBuilder;
6060
import org.springframework.boot.web.servlet.FilterRegistrationBean;
6161
import org.springframework.context.ApplicationContext;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/tomcat/TomcatMetricsAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
import org.springframework.boot.SpringApplication;
2929
import org.springframework.boot.actuate.metrics.web.tomcat.TomcatMetricsBinder;
3030
import org.springframework.boot.autoconfigure.AutoConfigurations;
31-
import org.springframework.boot.autoconfigure.web.server.reactive.tomcat.TomcatReactiveWebServerAutoConfiguration;
32-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3331
import org.springframework.boot.context.event.ApplicationStartedEvent;
3432
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
3533
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
3634
import org.springframework.boot.tomcat.TomcatWebServer;
3735
import org.springframework.boot.tomcat.reactive.TomcatReactiveWebServerFactory;
36+
import org.springframework.boot.tomcat.reactive.autoconfigure.TomcatReactiveWebServerAutoConfiguration;
3837
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
38+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
3939
import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext;
4040
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
4141
import org.springframework.context.ConfigurableApplicationContext;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/reactive/ReactiveManagementChildContextConfigurationIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
import org.springframework.boot.autoconfigure.AutoConfigurations;
3939
import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration;
4040
import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration;
41-
import org.springframework.boot.autoconfigure.web.server.reactive.tomcat.TomcatReactiveWebServerAutoConfiguration;
4241
import org.springframework.boot.convert.ApplicationConversionService;
4342
import org.springframework.boot.env.ConfigTreePropertySource;
4443
import org.springframework.boot.test.context.assertj.AssertableReactiveWebApplicationContext;
4544
import org.springframework.boot.test.context.runner.ContextConsumer;
4645
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
4746
import org.springframework.boot.tomcat.TomcatWebServer;
47+
import org.springframework.boot.tomcat.reactive.autoconfigure.TomcatReactiveWebServerAutoConfiguration;
4848
import org.springframework.boot.web.context.ServerPortInfoApplicationContextInitializer;
4949
import org.springframework.boot.web.context.WebServerInitializedEvent;
5050
import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/ChildManagementContextInitializerAotTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
import org.springframework.boot.actuate.autoconfigure.web.server.tomcat.TomcatServletManagementContextAutoConfiguration;
2929
import org.springframework.boot.actuate.autoconfigure.web.servlet.ServletManagementContextAutoConfiguration;
3030
import org.springframework.boot.autoconfigure.AutoConfigurations;
31-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3231
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
3332
import org.springframework.boot.test.system.CapturedOutput;
3433
import org.springframework.boot.test.system.OutputCaptureExtension;
3534
import org.springframework.boot.test.util.TestPropertyValues;
3635
import org.springframework.boot.testsupport.web.servlet.DirtiesUrlFactories;
36+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
3737
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
3838
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
3939
import org.springframework.context.ApplicationContextInitializer;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementContextAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
import org.springframework.boot.actuate.autoconfigure.web.server.tomcat.TomcatServletManagementContextAutoConfiguration;
2727
import org.springframework.boot.actuate.autoconfigure.web.servlet.ServletManagementContextAutoConfiguration;
2828
import org.springframework.boot.autoconfigure.AutoConfigurations;
29-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
3029
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
3130
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
3231
import org.springframework.boot.test.system.CapturedOutput;
3332
import org.springframework.boot.test.system.OutputCaptureExtension;
33+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
3434
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
3535
import org.springframework.util.StringUtils;
3636

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/MockServletWebServerFactory.java

Lines changed: 0 additions & 91 deletions
This file was deleted.

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/WebMvcEndpointChildContextConfigurationIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
3939
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
4040
import org.springframework.boot.autoconfigure.AutoConfigurations;
41-
import org.springframework.boot.autoconfigure.web.server.servlet.tomcat.TomcatServletWebServerAutoConfiguration;
4241
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
4342
import org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration;
4443
import org.springframework.boot.convert.ApplicationConversionService;
4544
import org.springframework.boot.env.ConfigTreePropertySource;
4645
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
4746
import org.springframework.boot.test.context.runner.ContextConsumer;
4847
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
48+
import org.springframework.boot.tomcat.servlet.autoconfigure.TomcatServletWebServerAutoConfiguration;
4949
import org.springframework.boot.web.context.ServerPortInfoApplicationContextInitializer;
5050
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
5151
import org.springframework.context.ConfigurableApplicationContext;

0 commit comments

Comments
 (0)