Skip to content

Commit

Permalink
Switch to MongoDB 5.0 driver.
Browse files Browse the repository at this point in the history
Adapt code to no longer available MongoClientSettings#getStreamFactoryFactory method.
  • Loading branch information
christophstrobl committed Mar 20, 2024
1 parent 558d811 commit 87ba0c4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ public void destroy() {
}
}

@SuppressWarnings("deprecation")
private boolean isCustomTransportConfiguration(MongoClientSettings settings) {
return settings != null
&& (settings.getTransportSettings() != null || settings.getStreamFactoryFactory() != null);
return settings != null && settings.getTransportSettings() != null;
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ void customizerWithTransportSettingsOverridesAutoConfig() {
assertThat(settings.getApplicationName()).isEqualTo("custom-transport-settings");
assertThat(settings.getTransportSettings())
.isSameAs(SimpleTransportSettingsCustomizerConfig.transportSettings);
assertThat(settings.getStreamFactoryFactory()).isNull();
});
}

Expand Down
2 changes: 1 addition & 1 deletion spring-boot-project/spring-boot-dependencies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ bom {
releaseNotes("https://github.com/mockito/mockito/releases/tag/v{version}")
}
}
library("MongoDB", "4.11.1") {
library("MongoDB", "5.0.0") {
group("org.mongodb") {
modules = [
"bson",
Expand Down

0 comments on commit 87ba0c4

Please sign in to comment.