Skip to content

Commit e3b9377

Browse files
wilkinsonaphilwebb
authored andcommitted
Remove spring-boot-autoconfigure-all
1 parent 4730c64 commit e3b9377

File tree

13 files changed

+92
-187
lines changed

13 files changed

+92
-187
lines changed

settings.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ include "spring-boot-project:spring-boot-actuator-integration-tests"
4949
include "spring-boot-project:spring-boot-amqp"
5050
include "spring-boot-project:spring-boot-artemis"
5151
include "spring-boot-project:spring-boot-autoconfigure"
52-
include "spring-boot-project:spring-boot-autoconfigure-all"
5352
include "spring-boot-project:spring-boot-batch"
5453
include "spring-boot-project:spring-boot-cache"
5554
include "spring-boot-project:spring-boot-cassandra"

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

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

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

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

spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/logback-test.xml

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

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,6 @@ bom {
19821982
"spring-boot-amqp",
19831983
"spring-boot-artemis",
19841984
"spring-boot-autoconfigure",
1985-
"spring-boot-autoconfigure-all",
19861985
"spring-boot-autoconfigure-processor",
19871986
"spring-boot-batch",
19881987
"spring-boot-buildpack-platform",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ artifacts {
2424

2525
dependencies {
2626
api(project(":spring-boot-project:spring-boot"))
27-
api(project(":spring-boot-project:spring-boot-autoconfigure-all"))
27+
api(project(":spring-boot-project:spring-boot-autoconfigure"))
2828

2929
intTestDependencies(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
3030

31-
intTestImplementation(project(":spring-boot-project:spring-boot-autoconfigure-all"))
31+
intTestImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
3232
intTestImplementation(project(":spring-boot-project:spring-boot-restclient"))
3333
intTestImplementation(project(":spring-boot-project:spring-boot-test"))
3434
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))

spring-boot-project/spring-boot-docker-compose-all/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ dependencies {
4040
optional(project(":spring-boot-project:spring-boot-activemq"))
4141
optional(project(":spring-boot-project:spring-boot-amqp"))
4242
optional(project(":spring-boot-project:spring-boot-artemis"))
43-
optional(project(":spring-boot-project:spring-boot-autoconfigure-all"))
4443
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure-all"))
4544
optional(project(":spring-boot-project:spring-boot-cassandra"))
4645
optional(project(":spring-boot-project:spring-boot-data-redis"))

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ dependencies {
233233
implementation(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure"))
234234
implementation(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure-all"))
235235
implementation(project(path: ":spring-boot-project:spring-boot-amqp"))
236-
implementation(project(path: ":spring-boot-project:spring-boot-autoconfigure-all"))
237236
implementation(project(path: ":spring-boot-project:spring-boot-cache"))
238237
implementation(project(path: ":spring-boot-project:spring-boot-data-cassandra"))
239238
implementation(project(path: ":spring-boot-project:spring-boot-data-elasticsearch"))

spring-boot-project/spring-boot-security/src/test/java/org/springframework/boot/security/autoconfigure/servlet/SecurityFilterAutoConfigurationTests.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.boot.security.autoconfigure.servlet;
1818

19+
import org.assertj.core.api.Assertions;
1920
import org.junit.jupiter.api.Test;
2021

2122
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
@@ -26,13 +27,17 @@
2627
import org.springframework.boot.security.autoconfigure.servlet.SecurityFilterAutoConfigurationEarlyInitializationTests.DeserializerBean;
2728
import org.springframework.boot.security.autoconfigure.servlet.SecurityFilterAutoConfigurationEarlyInitializationTests.ExampleController;
2829
import org.springframework.boot.security.autoconfigure.servlet.SecurityFilterAutoConfigurationEarlyInitializationTests.JacksonModuleBean;
30+
import org.springframework.boot.servlet.filter.OrderedRequestContextFilter;
2931
import org.springframework.boot.web.context.servlet.AnnotationConfigServletWebApplicationContext;
32+
import org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean;
3033
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;
3134
import org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration;
3235
import org.springframework.context.annotation.Configuration;
3336
import org.springframework.context.annotation.Import;
3437
import org.springframework.mock.web.MockServletContext;
3538

39+
import static org.assertj.core.api.Assertions.assertThat;
40+
3641
/**
3742
* Tests for {@link SecurityFilterAutoConfiguration}.
3843
*
@@ -49,6 +54,20 @@ void filterAutoConfigurationWorksWithoutSecurityAutoConfiguration() {
4954
}
5055
}
5156

57+
@Test
58+
void filterIsOrderedShortlyAfterRequestContextFilter() {
59+
try (AnnotationConfigServletWebApplicationContext context = new AnnotationConfigServletWebApplicationContext()) {
60+
context.setServletContext(new MockServletContext());
61+
context.register(SecurityAutoConfiguration.class);
62+
context.register(Config.class);
63+
context.refresh();
64+
int securityFilterOrder = context.getBean(DelegatingFilterProxyRegistrationBean.class).getOrder();
65+
int requestContextFilterOrder = new OrderedRequestContextFilter().getOrder();
66+
assertThat(securityFilterOrder).isGreaterThan(requestContextFilterOrder)
67+
.isCloseTo(requestContextFilterOrder, Assertions.within(5));
68+
}
69+
}
70+
5271
@Configuration(proxyBeanMethods = false)
5372
@Import({ DeserializerBean.class, JacksonModuleBean.class, ExampleController.class, ConverterBean.class })
5473
@ImportAutoConfiguration({ WebMvcAutoConfiguration.class, JacksonAutoConfiguration.class,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright 2012-2025 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.boot.servlet.filter;
18+
19+
import java.util.ArrayList;
20+
import java.util.List;
21+
22+
import org.assertj.core.api.Assertions;
23+
import org.junit.jupiter.api.Test;
24+
25+
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
26+
27+
import static org.assertj.core.api.Assertions.assertThat;
28+
29+
/**
30+
* Tests for the ordering of various {@link OrderedFilter} implementations.
31+
*
32+
* @author Andy Wilkinson
33+
*/
34+
class OrderedFilterOrderingTests {
35+
36+
@Test
37+
void ordering() {
38+
OrderedCharacterEncodingFilter characterEncoding = new OrderedCharacterEncodingFilter();
39+
OrderedFormContentFilter formContent = new OrderedFormContentFilter();
40+
OrderedHiddenHttpMethodFilter hiddenHttpMethod = new OrderedHiddenHttpMethodFilter();
41+
OrderedRequestContextFilter requestContext = new OrderedRequestContextFilter();
42+
List<OrderedFilter> filters = new ArrayList<>(
43+
List.of(characterEncoding, formContent, hiddenHttpMethod, requestContext));
44+
AnnotationAwareOrderComparator.sort(filters);
45+
assertThat(filters).containsExactly(characterEncoding, hiddenHttpMethod, formContent, requestContext);
46+
}
47+
48+
@Test
49+
void requestContextOrderingIsCloseToRequestWrapperFilterMaxOrder() {
50+
assertThat(new OrderedRequestContextFilter().getOrder())
51+
.isCloseTo(OrderedFilter.REQUEST_WRAPPER_FILTER_MAX_ORDER, Assertions.within(105));
52+
}
53+
54+
}

0 commit comments

Comments
 (0)