@Configuration @ConditionalOnClass(value={, }) public class MongoTemplateAutoConfiguration extends Object
Auto-configuration for Spring Data's
MongoTemplate.
Registers a org.springframework.data.mongodb.core.MongoTemplate 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 |
|---|
MongoTemplateAutoConfiguration() |
@Bean @ConditionalOnMissingBean public MongoTemplate mongoTemplate(Mongo mongo) throws UnknownHostException
UnknownHostExceptionCopyright © 2014 Pivotal Software, Inc.. All rights reserved.