public class MongoClientFactory extends Object
MongoClient
that applies MongoProperties
.Constructor and Description |
---|
MongoClientFactory(MongoProperties properties,
org.springframework.core.env.Environment environment) |
Modifier and Type | Method and Description |
---|---|
com.mongodb.MongoClient |
createMongoClient(com.mongodb.MongoClientOptions options)
Creates a
MongoClient using the given options . |
public MongoClientFactory(MongoProperties properties, org.springframework.core.env.Environment environment)
public com.mongodb.MongoClient createMongoClient(com.mongodb.MongoClientOptions options)
MongoClient
using the given options
. If the environment
contains a local.mongo.port
property, it is used to configure a client to
an embedded MongoDB instance.options
- the optionsCopyright © 2019 Pivotal Software, Inc.. All rights reserved.