diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index 9dbca47cd1..16cc1011ca 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -66,6 +66,7 @@ import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletCon import org.springframework.boot.context.embedded.undertow.UndertowBuilderCustomizer; import org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.boot.web.servlet.ServletContextInitializer; import org.springframework.context.EnvironmentAware; @@ -1216,6 +1217,7 @@ public class ServerProperties /** * Number of buffer per region. */ + @Deprecated private Integer buffersPerRegion; /** @@ -1243,6 +1245,7 @@ public class ServerProperties this.bufferSize = bufferSize; } + @DeprecatedConfigurationProperty(reason = "The property is not used by Undertow. See https://issues.jboss.org/browse/UNDERTOW-587 for details") public Integer getBuffersPerRegion() { return this.buffersPerRegion; } @@ -1284,9 +1287,6 @@ public class ServerProperties if (this.bufferSize != null) { factory.setBufferSize(this.bufferSize); } - if (this.buffersPerRegion != null) { - factory.setBuffersPerRegion(this.buffersPerRegion); - } if (this.ioThreads != null) { factory.setIoThreads(this.ioThreads); } diff --git a/spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/UndertowEmbeddedServletContainerFactory.java b/spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/UndertowEmbeddedServletContainerFactory.java index fd06f59390..377ded6adc 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/UndertowEmbeddedServletContainerFactory.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/UndertowEmbeddedServletContainerFactory.java @@ -110,8 +110,6 @@ public class UndertowEmbeddedServletContainerFactory private Integer bufferSize; - private Integer buffersPerRegion; - private Integer ioThreads; private Integer workerThreads; @@ -236,9 +234,6 @@ public class UndertowEmbeddedServletContainerFactory if (this.bufferSize != null) { builder.setBufferSize(this.bufferSize); } - if (this.buffersPerRegion != null) { - builder.setBuffersPerRegion(this.buffersPerRegion); - } if (this.ioThreads != null) { builder.setIoThreads(this.ioThreads); } @@ -544,8 +539,9 @@ public class UndertowEmbeddedServletContainerFactory this.bufferSize = bufferSize; } + @Deprecated public void setBuffersPerRegion(Integer buffersPerRegion) { - this.buffersPerRegion = buffersPerRegion; + } public void setIoThreads(Integer ioThreads) {