类 ReactiveMongoClientFactory
- java.lang.Object
- org.springframework.boot.autoconfigure.mongo.ReactiveMongoClientFactory
public class ReactiveMongoClientFactory extends Object
A factory for a reactiveMongoClient
that appliesMongoProperties
.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 ReactiveMongoClientFactory(MongoProperties properties, org.springframework.core.env.Environment environment, List<MongoClientSettingsBuilderCustomizer> builderCustomizers)
构造器详细资料
ReactiveMongoClientFactory
public ReactiveMongoClientFactory(MongoProperties properties, org.springframework.core.env.Environment environment, List<MongoClientSettingsBuilderCustomizer> builderCustomizers)
方法详细资料
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.- 参数:
settings
- the settings- 返回:
- the Mongo client