Skip to content

Commit 9b3bf95

Browse files
committed
Remove spring-boot-autoconfigure-all
1 parent b58c326 commit 9b3bf95

File tree

11 files changed

+96
-30
lines changed

11 files changed

+96
-30
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"
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,19 @@
11
plugins {
2-
id "java-library"
3-
id "org.springframework.boot.deployed"
4-
id "org.springframework.boot.optional-dependencies"
2+
id "java"
53
}
64

75
description = "Spring Boot AutoConfigure All"
86

97
dependencies {
10-
api(project(":spring-boot-project:spring-boot"))
11-
api(project(":spring-boot-project:spring-boot-autoconfigure"))
12-
13-
optional(project(":spring-boot-project:spring-boot-web-server"))
14-
optional("jakarta.servlet:jakarta.servlet-api")
15-
optional("org.springframework:spring-webmvc")
16-
17-
testImplementation(project(":spring-boot-project:spring-boot-data-redis"))
8+
testImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
189
testImplementation(project(":spring-boot-project:spring-boot-http-converter"))
19-
testImplementation(project(":spring-boot-project:spring-boot-jetty"))
2010
testImplementation(project(":spring-boot-project:spring-boot-security"))
2111
testImplementation(project(":spring-boot-project:spring-boot-servlet"))
2212
testImplementation(project(":spring-boot-project:spring-boot-session-data-redis"))
2313
testImplementation(project(":spring-boot-project:spring-boot-test"))
24-
testImplementation(project(":spring-boot-project:spring-boot-tomcat"))
2514
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
26-
testImplementation(project(":spring-boot-project:spring-boot-undertow"))
15+
testImplementation(project(":spring-boot-project:spring-boot-web-server"))
2716
testImplementation(project(":spring-boot-project:spring-boot-webmvc"))
2817
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
29-
30-
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
18+
testImplementation("jakarta.servlet:jakarta.servlet-api")
3119
}

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+
}

spring-boot-project/spring-boot-session/src/test/java/org/springframework/boot/session/autoconfigure/SessionPropertiesTests.java

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
import java.time.Duration;
2020
import java.util.function.Supplier;
2121

22+
import org.assertj.core.api.Assertions;
2223
import org.junit.jupiter.api.Test;
2324

25+
import org.springframework.core.Ordered;
26+
2427
import static org.assertj.core.api.Assertions.assertThat;
2528
import static org.mockito.BDDMockito.then;
2629
import static org.mockito.Mockito.mock;
@@ -32,22 +35,28 @@
3235
*/
3336
class SessionPropertiesTests {
3437

38+
private final SessionProperties properties = new SessionProperties();
39+
3540
@Test
3641
@SuppressWarnings("unchecked")
3742
void determineTimeoutWithTimeoutIgnoreFallback() {
38-
SessionProperties properties = new SessionProperties();
39-
properties.setTimeout(Duration.ofMinutes(1));
43+
this.properties.setTimeout(Duration.ofMinutes(1));
4044
Supplier<Duration> fallback = mock(Supplier.class);
41-
assertThat(properties.determineTimeout(fallback)).isEqualTo(Duration.ofMinutes(1));
45+
assertThat(this.properties.determineTimeout(fallback)).isEqualTo(Duration.ofMinutes(1));
4246
then(fallback).shouldHaveNoInteractions();
4347
}
4448

4549
@Test
4650
void determineTimeoutWithNoTimeoutUseFallback() {
47-
SessionProperties properties = new SessionProperties();
48-
properties.setTimeout(null);
51+
this.properties.setTimeout(null);
4952
Duration fallback = Duration.ofMinutes(2);
50-
assertThat(properties.determineTimeout(() -> fallback)).isSameAs(fallback);
53+
assertThat(this.properties.determineTimeout(() -> fallback)).isSameAs(fallback);
54+
}
55+
56+
@Test
57+
void defaultFilterOrderIsCloseToHighestPrecedence() {
58+
assertThat(this.properties.getServlet().getFilterOrder()).isCloseTo(Ordered.HIGHEST_PRECEDENCE,
59+
Assertions.within(50));
5160
}
5261

5362
}

spring-boot-project/spring-boot-starters/spring-boot-starter/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description = "Core starter, including auto-configuration support, logging and Y
66

77
dependencies {
88
api(project(":spring-boot-project:spring-boot"))
9-
api(project(":spring-boot-project:spring-boot-autoconfigure-all"))
9+
api(project(":spring-boot-project:spring-boot-autoconfigure"))
1010
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-logging"))
1111
api("jakarta.annotation:jakarta.annotation-api")
1212
api("org.springframework:spring-core")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ configurations.all {
1717

1818
dependencies {
1919
api(project(":spring-boot-project:spring-boot"))
20+
api(project(":spring-boot-project:spring-boot-autoconfigure"))
2021
api(project(":spring-boot-project:spring-boot-test"))
21-
api(project(":spring-boot-project:spring-boot-autoconfigure-all"))
2222

2323
dockerTestImplementation(project(":spring-boot-project:spring-boot-data-mongodb"))
2424
dockerTestImplementation(project(":spring-boot-project:spring-boot-docker-compose"))

0 commit comments

Comments
 (0)