Skip to content

Commit 7db43ef

Browse files
committed
Mark spring-web optional in spring-boot-rsocket
This commit moves the spring-web dependency from implementation to optional. It also adds an api dependency to spring-web in the rsocket starter. The reasoning behind this change is that RSocket can be used without spring-web, and we want to make sure that consumers of the dependency can achieve that goal, as they were able to in previous versions. However, we believe that most RSocket-based applications need spring-web as, without it, only the simple and not efficient implementation of RouterMatcher is available. With the addition of exception handling using ControllerAdvice, this change makes also sure that it works out of the box with the starter. Closes gh-47409
1 parent d97539b commit 7db43ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

module/spring-boot-rsocket/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ dependencies {
3131

3232
compileOnly("com.google.code.findbugs:jsr305")
3333

34-
implementation("org.springframework:spring-web")
35-
3634
optional(project(":core:spring-boot-autoconfigure"))
3735
optional(project(":module:spring-boot-jackson"))
3836
optional(project(":module:spring-boot-reactor-netty"))
3937
optional("io.rsocket:rsocket-transport-netty")
38+
optional("org.springframework:spring-web")
4039
optional("tools.jackson.dataformat:jackson-dataformat-cbor")
4140

4241
testImplementation(project(":core:spring-boot-test"))

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ dependencies {
2828
api(project(":module:spring-boot-rsocket"))
2929

3030
api("io.rsocket:rsocket-transport-netty")
31+
api("org.springframework:spring-web")
3132
api("tools.jackson.dataformat:jackson-dataformat-cbor")
3233
}

0 commit comments

Comments
 (0)