public class MongoClientFactory extends Object
MongoClient
that applies MongoProperties
.Constructor and Description |
---|
MongoClientFactory(MongoProperties properties,
Environment environment) |
Modifier and Type | Method and Description |
---|---|
com.mongodb.client.MongoClient |
createMongoClient(com.mongodb.MongoClientSettings settings)
Creates a
MongoClient using the given settings . |
public MongoClientFactory(MongoProperties properties, Environment environment)
public com.mongodb.client.MongoClient createMongoClient(com.mongodb.MongoClientSettings settings)
MongoClient
using the given settings
.
If the environment contains a local.mongo.port
property, it is used to
configure a client to an embedded MongoDB instance.settings
- the settings