diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java index b8912d61ad..61d3c6eb0d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactory.java @@ -95,11 +95,6 @@ public class ReactiveMongoClientFactory { return createMongoClient(builder); } - private MongoClient createMongoClient(Builder builder) { - customize(builder); - return MongoClients.create(builder.build()); - } - private MongoClient createNetworkMongoClient(MongoClientSettings settings) { if (hasCustomAddress() || hasCustomCredentials()) { return createCredentialNetworkMongoClient(settings); @@ -138,6 +133,11 @@ public class ReactiveMongoClientFactory { return (value == null ? defaultValue : value); } + private MongoClient createMongoClient(Builder builder) { + customize(builder); + return MongoClients.create(builder.build()); + } + private Builder createBuilder(MongoClientSettings settings, ConnectionString connection) { Builder builder = builder(settings);