Skip to content

Commit 87ba0c4

Browse files
Switch to MongoDB 5.0 driver.
Adapt code to no longer available MongoClientSettings#getStreamFactoryFactory method.
1 parent 558d811 commit 87ba0c4

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoReactiveAutoConfiguration.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,8 @@ public void destroy() {
129129
}
130130
}
131131

132-
@SuppressWarnings("deprecation")
133132
private boolean isCustomTransportConfiguration(MongoClientSettings settings) {
134-
return settings != null
135-
&& (settings.getTransportSettings() != null || settings.getStreamFactoryFactory() != null);
133+
return settings != null && settings.getTransportSettings() != null;
136134
}
137135

138136
}

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoReactiveAutoConfigurationTests.java

-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ void customizerWithTransportSettingsOverridesAutoConfig() {
230230
assertThat(settings.getApplicationName()).isEqualTo("custom-transport-settings");
231231
assertThat(settings.getTransportSettings())
232232
.isSameAs(SimpleTransportSettingsCustomizerConfig.transportSettings);
233-
assertThat(settings.getStreamFactoryFactory()).isNull();
234233
});
235234
}
236235

Diff for: spring-boot-project/spring-boot-dependencies/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ bom {
12911291
releaseNotes("https://github.com/mockito/mockito/releases/tag/v{version}")
12921292
}
12931293
}
1294-
library("MongoDB", "4.11.1") {
1294+
library("MongoDB", "5.0.0") {
12951295
group("org.mongodb") {
12961296
modules = [
12971297
"bson",

0 commit comments

Comments
 (0)