Skip to content

Commit 95027e7

Browse files
committed
Create beginnings of spring-boot-tomcat module
1 parent f533ba7 commit 95027e7

File tree

122 files changed

+235
-187
lines changed

Some content is hidden

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

122 files changed

+235
-187
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ include "spring-boot-project:spring-boot-docs"
6767
include "spring-boot-project:spring-boot-test"
6868
include "spring-boot-project:spring-boot-testcontainers"
6969
include "spring-boot-project:spring-boot-test-autoconfigure"
70+
include "spring-boot-project:spring-boot-tomcat"
7071
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-configuration-processor-tests"
7172
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-launch-script-tests"
7273
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-loader-tests"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies {
1717
implementation("com.fasterxml.jackson.core:jackson-databind")
1818
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
1919

20+
optional(project(":spring-boot-project:spring-boot-tomcat"))
2021
optional("ch.qos.logback:logback-classic")
2122
optional("org.apache.cassandra:java-driver-core") {
2223
exclude group: "org.slf4j", module: "jcl-over-slf4j"

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
2828
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
3030
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
31+
import org.springframework.boot.tomcat.TomcatWebServer;
3132
import org.springframework.context.annotation.Bean;
3233

3334
/**
@@ -38,7 +39,7 @@
3839
*/
3940
@AutoConfiguration(after = CompositeMeterRegistryAutoConfiguration.class)
4041
@ConditionalOnWebApplication
41-
@ConditionalOnClass({ TomcatMetrics.class, Manager.class })
42+
@ConditionalOnClass({ TomcatMetrics.class, Manager.class, TomcatWebServer.class })
4243
public class TomcatMetricsAutoConfiguration {
4344

4445
@Bean

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.apache.catalina.valves.AccessLogValve;
2424

2525
import org.springframework.boot.actuate.autoconfigure.web.server.AccessLogCustomizer;
26-
import org.springframework.boot.web.server.tomcat.ConfigurableTomcatWebServerFactory;
26+
import org.springframework.boot.tomcat.ConfigurableTomcatWebServerFactory;
2727

2828
/**
2929
* {@link AccessLogCustomizer} for Tomcat.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
2525
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
2626
import org.springframework.boot.context.properties.EnableConfigurationProperties;
27-
import org.springframework.boot.web.server.reactive.tomcat.TomcatReactiveWebServerFactory;
27+
import org.springframework.boot.tomcat.reactive.TomcatReactiveWebServerFactory;
2828
import org.springframework.context.annotation.Bean;
2929

3030
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
2525
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
2626
import org.springframework.boot.context.properties.EnableConfigurationProperties;
27-
import org.springframework.boot.web.server.servlet.tomcat.TomcatServletWebServerFactory;
27+
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
2828
import org.springframework.context.annotation.Bean;
2929

3030
/**

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryMvcWebEndpointIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import org.springframework.boot.actuate.endpoint.web.ExposableWebEndpoint;
4545
import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpointDiscoverer;
4646
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
47-
import org.springframework.boot.web.server.servlet.tomcat.TomcatServletWebServerFactory;
47+
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
4848
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
4949
import org.springframework.context.ApplicationContext;
5050
import org.springframework.context.annotation.Bean;

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/SkipSslVerificationHttpRequestFactoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
import org.junit.jupiter.api.Test;
2323

2424
import org.springframework.boot.testsupport.web.servlet.ExampleServlet;
25+
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
2526
import org.springframework.boot.web.server.Ssl;
2627
import org.springframework.boot.web.server.WebServer;
27-
import org.springframework.boot.web.server.servlet.tomcat.TomcatServletWebServerFactory;
2828
import org.springframework.boot.web.servlet.ServletRegistrationBean;
2929
import org.springframework.http.HttpStatus;
3030
import org.springframework.http.ResponseEntity;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.springframework.boot.test.context.SpringBootTest;
3434
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
3535
import org.springframework.boot.test.web.server.LocalServerPort;
36-
import org.springframework.boot.web.server.servlet.tomcat.TomcatServletWebServerFactory;
36+
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
3737
import org.springframework.context.ConfigurableApplicationContext;
3838
import org.springframework.context.annotation.Bean;
3939
import org.springframework.context.annotation.Configuration;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
import org.springframework.boot.context.event.ApplicationStartedEvent;
3434
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
3535
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
36+
import org.springframework.boot.tomcat.TomcatWebServer;
37+
import org.springframework.boot.tomcat.reactive.TomcatReactiveWebServerFactory;
38+
import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
3639
import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext;
37-
import org.springframework.boot.web.server.reactive.tomcat.TomcatReactiveWebServerFactory;
38-
import org.springframework.boot.web.server.servlet.tomcat.TomcatServletWebServerFactory;
39-
import org.springframework.boot.web.server.tomcat.TomcatWebServer;
4040
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;
4141
import org.springframework.context.ConfigurableApplicationContext;
4242
import org.springframework.context.annotation.Bean;

0 commit comments

Comments
 (0)