Class ReactiveMongoClientFactory
- java.lang.Object
- org.springframework.boot.autoconfigure.mongo.ReactiveMongoClientFactory
public class ReactiveMongoClientFactory extends Object
A factory for a reactiveMongoClient
that appliesMongoProperties
.- Since:
- 2.0.0
Constructor Summary
Constructors Constructor Description ReactiveMongoClientFactory(MongoProperties properties, org.springframework.core.env.Environment environment, List<MongoClientSettingsBuilderCustomizer> builderCustomizers)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mongodb.reactivestreams.client.MongoClient
createMongoClient(com.mongodb.MongoClientSettings settings)
Creates aMongoClient
using the givensettings
.
Constructor Detail
ReactiveMongoClientFactory
public ReactiveMongoClientFactory(MongoProperties properties, org.springframework.core.env.Environment environment, List<MongoClientSettingsBuilderCustomizer> builderCustomizers)
Method Detail
createMongoClient
public com.mongodb.reactivestreams.client.MongoClient createMongoClient(com.mongodb.MongoClientSettings settings)
Creates aMongoClient
using the givensettings
. If the environment contains alocal.mongo.port
property, it is used to configure a client to an embedded MongoDB instance.- Parameters:
settings
- the settings- Returns:
- the Mongo client