@Configuration @ConditionalOnClass(value={com.mongodb.MongoClient.class,com.mongodb.client.MongoClient.class,org.springframework.data.mongodb.core.MongoTemplate.class}) @EnableConfigurationProperties(value=MongoProperties.class) @Import(value={org.springframework.boot.autoconfigure.data.mongo.MongoDataConfiguration.class,org.springframework.boot.autoconfigure.data.mongo.MongoDbFactoryConfiguration.class,org.springframework.boot.autoconfigure.data.mongo.MongoDbFactoryDependentConfiguration.class}) @AutoConfigureAfter(value=MongoAutoConfiguration.class) public class MongoDataAutoConfiguration extends Object
Auto-configuration
for Spring Data's mongo support.
Registers a MongoTemplate
and GridFsTemplate
beans if no other beans of
the same type are configured.
Honors the spring.data.mongodb.database property if set, otherwise connects to the test database.
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.