Skip to content

Commit 59f9cfb

Browse files
Nasko Vasilevsnicoll
authored andcommitted
Use missing MongoClientOptions in MongoProperties
See gh-6176
1 parent 13403a0 commit 59f9cfb

File tree

1 file changed

+10
-0
lines changed
  • spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo

1 file changed

+10
-0
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* @author Josh Long
4040
* @author Andy Wilkinson
4141
* @author Eddú Meléndez
42+
* @author Nasko Vasilev
4243
*/
4344
@ConfigurationProperties(prefix = "spring.data.mongodb")
4445
public class MongoProperties {
@@ -278,6 +279,15 @@ private Builder builder(MongoClientOptions options) {
278279
builder.threadsAllowedToBlockForConnectionMultiplier(
279280
options.getThreadsAllowedToBlockForConnectionMultiplier());
280281
builder.writeConcern(options.getWriteConcern());
282+
builder.minConnectionsPerHost(options.getMinConnectionsPerHost());
283+
builder.maxConnectionIdleTime(options.getMaxConnectionIdleTime());
284+
builder.maxConnectionLifeTime(options.getMaxConnectionLifeTime());
285+
builder.heartbeatFrequency(options.getHeartbeatFrequency());
286+
builder.minHeartbeatFrequency(options.getMinHeartbeatFrequency());
287+
builder.heartbeatConnectTimeout(options.getHeartbeatConnectTimeout());
288+
builder.heartbeatSocketTimeout(options.getHeartbeatSocketTimeout());
289+
builder.localThreshold(options.getLocalThreshold());
290+
builder.requiredReplicaSetName(options.getRequiredReplicaSetName());
281291
}
282292
return builder;
283293
}

0 commit comments

Comments
 (0)