Skip to content

Commit 2f99c19

Browse files
committed
Revert "Configure virtual threads on Undertow if enabled"
This reverts commit cff1b33. See gh-38819 Closes gh-39812
1 parent 40a7027 commit 2f99c19

File tree

3 files changed

+3
-68
lines changed

3 files changed

+3
-68
lines changed

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration.java

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2023 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.
@@ -34,18 +34,15 @@
3434
import org.springframework.boot.autoconfigure.thread.Threading;
3535
import org.springframework.boot.autoconfigure.web.ServerProperties;
3636
import org.springframework.boot.context.properties.EnableConfigurationProperties;
37-
import org.springframework.boot.web.embedded.undertow.UndertowDeploymentInfoCustomizer;
3837
import org.springframework.context.annotation.Bean;
3938
import org.springframework.context.annotation.Configuration;
4039
import org.springframework.core.env.Environment;
41-
import org.springframework.core.task.VirtualThreadTaskExecutor;
4240

4341
/**
4442
* {@link EnableAutoConfiguration Auto-configuration} for embedded servlet and reactive
4543
* web servers customizations.
4644
*
4745
* @author Phillip Webb
48-
* @author Moritz Halbritter
4946
* @since 2.0.0
5047
*/
5148
@AutoConfiguration
@@ -110,12 +107,6 @@ public UndertowWebServerFactoryCustomizer undertowWebServerFactoryCustomizer(Env
110107
return new UndertowWebServerFactoryCustomizer(environment, serverProperties);
111108
}
112109

113-
@Bean
114-
@ConditionalOnThreading(Threading.VIRTUAL)
115-
UndertowDeploymentInfoCustomizer virtualThreadsUndertowDeploymentInfoCustomizer() {
116-
return (deploymentInfo) -> deploymentInfo.setExecutor(new VirtualThreadTaskExecutor("undertow-"));
117-
}
118-
119110
}
120111

121112
/**

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizer.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public int getOrder() {
7777
public void customize(ConfigurableUndertowWebServerFactory factory) {
7878
PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
7979
ServerOptions options = new ServerOptions(factory);
80-
map.from(this.serverProperties::getMaxHttpRequestHeaderSize)
80+
ServerProperties properties = this.serverProperties;
81+
map.from(properties::getMaxHttpRequestHeaderSize)
8182
.asInt(DataSize::toBytes)
8283
.when(this::isPositive)
8384
.to(options.option(UndertowOptions.MAX_HEADER_SIZE));

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerConfigurationTests.java

-57
This file was deleted.

0 commit comments

Comments
 (0)