Class MongoRepositoriesAutoConfiguration

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

@AutoConfiguration(after=MongoDataAutoConfiguration.class) @ConditionalOnClass({com.mongodb.client.MongoClient.class,org.springframework.data.mongodb.repository.MongoRepository.class}) @ConditionalOnMissingBean({org.springframework.data.mongodb.repository.support.MongoRepositoryFactoryBean.class,org.springframework.data.mongodb.repository.config.MongoRepositoryConfigurationExtension.class}) @ConditionalOnRepositoryType(store="mongodb", type=IMPERATIVE) @Import(org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesRegistrar.class) public class MongoRepositoriesAutoConfiguration extends Object
Auto-configuration for Spring Data's Mongo Repositories.

Activates when there is no bean of type MongoRepositoryFactoryBean configured in the context, the Spring Data Mongo MongoRepository type is on the classpath, the Mongo client driver API is on the classpath, and there is no other configured MongoRepository.

Once in effect, the auto-configuration is the equivalent of enabling Mongo repositories using the @EnableMongoRepositories annotation.

Since:
1.0.0
Author:
Dave Syer, Oliver Gierke, Josh Long
See Also:
  • EnableMongoRepositories
  • Constructor Details

    • MongoRepositoriesAutoConfiguration

      public MongoRepositoriesAutoConfiguration()