Skip to content

Commit 108ca64

Browse files
committed
Reduce the effect of depending on spring-boot-starter-test
efde264 corrected spring-boot-webclient by adding to it an api dependency on spring-webflux. This had an unwanted side-effect on the classpath of anything that depends on spring-boot-starter-test. That classpath now contained all of the classes that are needed to deduce that the web application type should be reactive. This caused some smoke tests to fail as they'd incorrectly try to start a reactive web server. This commit updates spring-boot-starter-test so that its dependencies on spring-boot-restclient and spring-boot-webclient are not transitive. This prevents them from pulling in unwanted dependencies such as spring-webflux by default, while making their classes and auto-configuration available for classes that already depend on spring-webflux and the like through some other route. See gh-46292
1 parent efde264 commit 108ca64

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

starter/spring-boot-starter-test/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,18 @@ description = "Starter for testing Spring Boot applications with libraries inclu
2222

2323
dependencies {
2424
api(project(":core:spring-boot-test"))
25-
api(project(":module:spring-boot-restclient"))
25+
api(project(":module:spring-boot-http-client")) {
26+
transitive = false
27+
}
28+
api(project(":module:spring-boot-restclient")) {
29+
transitive = false
30+
}
2631
api(project(":module:spring-boot-restclient-test"))
2732
api(project(":module:spring-boot-test-autoconfigure"))
2833
api(project(":module:spring-boot-web-server-test"))
29-
api(project(":module:spring-boot-webclient"))
34+
api(project(":module:spring-boot-webclient")) {
35+
transitive = false
36+
}
3037
api(project(":starter:spring-boot-starter"))
3138
api("com.jayway.jsonpath:json-path")
3239
api("jakarta.xml.bind:jakarta.xml.bind-api")

0 commit comments

Comments
 (0)