@Configuration @ConditionalOnClass(value=com.mongodb.MongoClient.class) @EnableConfigurationProperties(value=MongoProperties.class) @ConditionalOnMissingBean(type="org.springframework.data.mongodb.MongoDbFactory") public class MongoAutoConfiguration extends Object
Auto-configuration
for Mongo.Constructor and Description |
---|
MongoAutoConfiguration(MongoProperties properties,
org.springframework.beans.factory.ObjectProvider<com.mongodb.MongoClientOptions> options,
org.springframework.core.env.Environment environment) |
public MongoAutoConfiguration(MongoProperties properties, org.springframework.beans.factory.ObjectProvider<com.mongodb.MongoClientOptions> options, org.springframework.core.env.Environment environment)
@PreDestroy public void close()
@Bean @ConditionalOnMissingBean public com.mongodb.MongoClient mongo() throws UnknownHostException
UnknownHostException
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.