@Configuration @ConditionalOnClass(value={com.mongodb.reactivestreams.client.MongoClient.class,org.springframework.data.mongodb.core.ReactiveMongoTemplate.class}) @EnableConfigurationProperties(value=MongoProperties.class) @AutoConfigureAfter(value={MongoReactiveAutoConfiguration.class,MongoDataAutoConfiguration.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.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)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.