@Configuration @ConditionalOnClass(value={com.mongodb.reactivestreams.client.MongoClient.class,org.springframework.data.mongodb.core.ReactiveMongoTemplate.class}) @ConditionalOnBean(value=com.mongodb.reactivestreams.client.MongoClient.class) @EnableConfigurationProperties(value=MongoProperties.class) @Import(value=org.springframework.boot.autoconfigure.data.mongo.MongoDataConfiguration.class) @AutoConfigureAfter(value=MongoReactiveAutoConfiguration.class) public class MongoReactiveDataAutoConfiguration extends Object
Auto-configuration
for Spring Data's reactive mongo
support.
Registers a ReactiveMongoTemplate
bean if no other bean of the same type is
configured.
Honors the spring.data.mongodb.database property if set, otherwise connects to the test database.
Constructor and Description |
---|
MongoReactiveDataAutoConfiguration(MongoProperties properties) |
Modifier and Type | Method and Description |
---|---|
org.springframework.data.mongodb.core.convert.MappingMongoConverter |
mappingMongoConverter(org.springframework.data.mongodb.core.mapping.MongoMappingContext context,
org.springframework.data.mongodb.core.convert.MongoCustomConversions conversions) |
org.springframework.data.mongodb.core.SimpleReactiveMongoDatabaseFactory |
reactiveMongoDatabaseFactory(com.mongodb.reactivestreams.client.MongoClient mongo) |
org.springframework.data.mongodb.core.ReactiveMongoTemplate |
reactiveMongoTemplate(org.springframework.data.mongodb.ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory,
org.springframework.data.mongodb.core.convert.MongoConverter converter) |
public MongoReactiveDataAutoConfiguration(MongoProperties properties)
@Bean @ConditionalOnMissingBean(value=org.springframework.data.mongodb.ReactiveMongoDatabaseFactory.class) public org.springframework.data.mongodb.core.SimpleReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory(com.mongodb.reactivestreams.client.MongoClient mongo)
@Bean @ConditionalOnMissingBean public org.springframework.data.mongodb.core.ReactiveMongoTemplate reactiveMongoTemplate(org.springframework.data.mongodb.ReactiveMongoDatabaseFactory reactiveMongoDatabaseFactory, org.springframework.data.mongodb.core.convert.MongoConverter converter)
@Bean @ConditionalOnMissingBean(value=org.springframework.data.mongodb.core.convert.MongoConverter.class) public org.springframework.data.mongodb.core.convert.MappingMongoConverter mappingMongoConverter(org.springframework.data.mongodb.core.mapping.MongoMappingContext context, org.springframework.data.mongodb.core.convert.MongoCustomConversions conversions)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.