use of org.springframework.boot.autoconfigure.mongo.ReactiveMongoClientFactory in project scaffold-clean-architecture by bancolombia.
the class MongoConfig method mongoProperties.
@Bean
public ReactiveMongoClientFactory mongoProperties(MongoDBSecret secret, Environment env) {
MongoProperties properties = new MongoProperties();
properties.setUri(secret.getUri());
List<MongoClientSettingsBuilderCustomizer> list = new ArrayList<>();
list.add(new MongoPropertiesClientSettingsBuilderCustomizer(properties, env));
return new ReactiveMongoClientFactory(list);
}
Aggregations