From 84612f36ce553a8074bea3a8a76ea6283d026f3d Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Thu, 13 Mar 2025 11:58:36 +0100 Subject: [PATCH] Move UseApr enum inside the Tomcat class See gh-44033 --- .../autoconfigure/web/ServerProperties.java | 44 +++++++++---------- ...catReactiveWebServerFactoryCustomizer.java | 2 +- ...mcatServletWebServerFactoryCustomizer.java | 2 +- .../web/ServerPropertiesTests.java | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index 9f64cb05b50..cfaf349ee09 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -1132,6 +1132,28 @@ public class ServerProperties { } + /** + * When to use APR. + */ + public enum UseApr { + + /** + * Always use APR and fail if it's not available. + */ + ALWAYS, + + /** + * Use APR if it is available. + */ + WHEN_AVAILABLE, + + /** + * Never user APR. + */ + NEVER + + } + } /** @@ -1937,26 +1959,4 @@ public class ServerProperties { } - /** - * When to use APR. - */ - public enum UseApr { - - /** - * Always use APR and fail if it's not available. - */ - ALWAYS, - - /** - * Use APR if it is available. - */ - WHEN_AVAILABLE, - - /** - * Never user APR. - */ - NEVER - - } - } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/TomcatReactiveWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/TomcatReactiveWebServerFactoryCustomizer.java index 4291e5c075c..58ef3a1bd83 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/TomcatReactiveWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/TomcatReactiveWebServerFactoryCustomizer.java @@ -20,7 +20,7 @@ import org.apache.catalina.core.AprLifecycleListener; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.ServerProperties.Tomcat; -import org.springframework.boot.autoconfigure.web.ServerProperties.UseApr; +import org.springframework.boot.autoconfigure.web.ServerProperties.Tomcat.UseApr; import org.springframework.boot.web.embedded.tomcat.TomcatReactiveWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.util.Assert; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizer.java index ec40912ec2d..c59ad10c654 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizer.java @@ -19,7 +19,7 @@ package org.springframework.boot.autoconfigure.web.servlet; import org.apache.catalina.core.AprLifecycleListener; import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.autoconfigure.web.ServerProperties.UseApr; +import org.springframework.boot.autoconfigure.web.ServerProperties.Tomcat.UseApr; import org.springframework.boot.web.embedded.tomcat.ConfigurableTomcatWebServerFactory; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java index 97704daebf1..a7fa8a4dd64 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java @@ -40,7 +40,7 @@ import org.junit.jupiter.api.condition.JRE; import reactor.netty.http.HttpDecoderSpec; import org.springframework.boot.autoconfigure.web.ServerProperties.Tomcat.Accesslog; -import org.springframework.boot.autoconfigure.web.ServerProperties.UseApr; +import org.springframework.boot.autoconfigure.web.ServerProperties.Tomcat.UseApr; import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.source.ConfigurationPropertySource;