Skip to content

Commit 06b7aeb

Browse files
wilkinsonaphilwebb
authored andcommitted
Move servlet http encoding auto-configuration into spring-boot-servlet
Issue: 46151
1 parent de92b7b commit 06b7aeb

File tree

12 files changed

+9
-49
lines changed

12 files changed

+9
-49
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
plugins {
1919
id "java-library"
20-
id "org.springframework.boot.auto-configuration"
21-
id "org.springframework.boot.configuration-properties"
2220
id "org.springframework.boot.deployed"
2321
id "org.springframework.boot.optional-dependencies"
2422
}

spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/web/servlet/package-info.java

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

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

Lines changed: 0 additions & 1 deletion
This file was deleted.

spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/FilterOrderingIntegrationTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
2727
import org.springframework.boot.http.converter.autoconfigure.HttpMessageConvertersAutoConfiguration;
2828
import org.springframework.boot.security.autoconfigure.servlet.SecurityAutoConfiguration;
29+
import org.springframework.boot.servlet.autoconfigure.HttpEncodingAutoConfiguration;
2930
import org.springframework.boot.session.autoconfigure.SessionAutoConfiguration;
3031
import org.springframework.boot.test.util.TestPropertyValues;
3132
import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostProcessor;

spring-boot-project/spring-boot-docs/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ dependencies {
8181
autoConfiguration(project(path: ":spring-boot-project:spring-boot-amqp", configuration: "autoConfigurationMetadata"))
8282
autoConfiguration(project(path: ":spring-boot-project:spring-boot-artemis", configuration: "autoConfigurationMetadata"))
8383
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "autoConfigurationMetadata"))
84-
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "autoConfigurationMetadata"))
8584
autoConfiguration(project(path: ":spring-boot-project:spring-boot-batch", configuration: "autoConfigurationMetadata"))
8685
autoConfiguration(project(path: ":spring-boot-project:spring-boot-cache", configuration: "autoConfigurationMetadata"))
8786
autoConfiguration(project(path: ":spring-boot-project:spring-boot-cassandra", configuration: "autoConfigurationMetadata"))
@@ -169,7 +168,6 @@ dependencies {
169168
configurationProperties(project(path: ":spring-boot-project:spring-boot-amqp", configuration: "configurationPropertiesMetadata"))
170169
configurationProperties(project(path: ":spring-boot-project:spring-boot-artemis", configuration: "configurationPropertiesMetadata"))
171170
configurationProperties(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "configurationPropertiesMetadata"))
172-
configurationProperties(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "configurationPropertiesMetadata"))
173171
configurationProperties(project(path: ":spring-boot-project:spring-boot-batch", configuration: "configurationPropertiesMetadata"))
174172
configurationProperties(project(path: ":spring-boot-project:spring-boot-cache", configuration: "configurationPropertiesMetadata"))
175173
configurationProperties(project(path: ":spring-boot-project:spring-boot-cassandra", configuration: "configurationPropertiesMetadata"))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.web.servlet;
17+
package org.springframework.boot.servlet.autoconfigure;
1818

1919
import org.springframework.boot.autoconfigure.AutoConfiguration;
2020
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.web.servlet;
17+
package org.springframework.boot.servlet.autoconfigure;
1818

1919
import java.nio.charset.Charset;
2020
import java.nio.charset.StandardCharsets;
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
org.springframework.boot.servlet.actuate.autoconfigure.ServletManagementContextAutoConfiguration
22
org.springframework.boot.servlet.actuate.autoconfigure.exchanges.ServletHttpExchangesAutoConfiguration
33
org.springframework.boot.servlet.actuate.autoconfigure.mappings.ServletMappingsAutoConfiguration
4-
org.springframework.boot.servlet.autoconfigure.MultipartAutoConfiguration
4+
org.springframework.boot.servlet.autoconfigure.HttpEncodingAutoConfiguration
5+
org.springframework.boot.servlet.autoconfigure.MultipartAutoConfiguration
Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.web.servlet;
17+
package org.springframework.boot.servlet.autoconfigure;
1818

1919
import java.util.ArrayList;
2020
import java.util.List;
@@ -26,8 +26,6 @@
2626
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
2727
import org.springframework.boot.test.util.TestPropertyValues;
2828
import org.springframework.boot.web.context.servlet.AnnotationConfigServletWebApplicationContext;
29-
import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostProcessor;
30-
import org.springframework.boot.web.server.servlet.MockServletWebServerFactory;
3129
import org.springframework.boot.web.servlet.filter.OrderedFormContentFilter;
3230
import org.springframework.boot.web.servlet.filter.OrderedHiddenHttpMethodFilter;
3331
import org.springframework.context.annotation.Bean;
@@ -140,7 +138,7 @@ private AnnotationConfigServletWebApplicationContext doLoad(Class<?>[] configs,
140138
AnnotationConfigServletWebApplicationContext applicationContext = new AnnotationConfigServletWebApplicationContext();
141139
TestPropertyValues.of(environment).applyTo(applicationContext);
142140
applicationContext.register(configs);
143-
applicationContext.register(MinimalWebAutoConfiguration.class, HttpEncodingAutoConfiguration.class);
141+
applicationContext.register(HttpEncodingAutoConfiguration.class);
144142
applicationContext.setServletContext(new MockServletContext());
145143
applicationContext.refresh();
146144
return applicationContext;
@@ -179,19 +177,4 @@ OrderedFormContentFilter formContentFilter() {
179177

180178
}
181179

182-
@Configuration(proxyBeanMethods = false)
183-
static class MinimalWebAutoConfiguration {
184-
185-
@Bean
186-
MockServletWebServerFactory mockServletWebServerFactory() {
187-
return new MockServletWebServerFactory();
188-
}
189-
190-
@Bean
191-
static WebServerFactoryCustomizerBeanPostProcessor servletWebServerCustomizerBeanPostProcessor() {
192-
return new WebServerFactoryCustomizerBeanPostProcessor();
193-
}
194-
195-
}
196-
197180
}

0 commit comments

Comments
 (0)