Class MongoDataAutoConfiguration

java.lang.Object
org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration

@AutoConfiguration(after=MongoAutoConfiguration.class) @ConditionalOnClass({com.mongodb.client.MongoClient.class,org.springframework.data.mongodb.core.MongoTemplate.class}) @EnableConfigurationProperties(MongoProperties.class) @Import({org.springframework.boot.autoconfigure.data.mongo.MongoDataConfiguration.class,org.springframework.boot.autoconfigure.data.mongo.MongoDatabaseFactoryConfiguration.class,org.springframework.boot.autoconfigure.data.mongo.MongoDatabaseFactoryDependentConfiguration.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.

Since:
1.1.0
Author:
Dave Syer, Oliver Gierke, Josh Long, Phillip Webb, EddĂș MelĂ©ndez, Stephane Nicoll, Christoph Strobl
  • Constructor Details

    • MongoDataAutoConfiguration

      public MongoDataAutoConfiguration()