Revert on bean condition for mongo repositories

pull/1052/head
Dave Syer 11 years ago
parent dd176ccacf
commit 6902f2ac97

@ -18,13 +18,11 @@ package org.springframework.boot.autoconfigure.data.mongo;
import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration; import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.repository.MongoRepository; import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.data.mongodb.repository.support.MongoRepositoryFactoryBean; import org.springframework.data.mongodb.repository.support.MongoRepositoryFactoryBean;
@ -54,7 +52,6 @@ import com.mongodb.Mongo;
*/ */
@Configuration @Configuration
@ConditionalOnClass({ Mongo.class, MongoRepository.class }) @ConditionalOnClass({ Mongo.class, MongoRepository.class })
@ConditionalOnBean(MongoOperations.class)
@ConditionalOnMissingBean(MongoRepositoryFactoryBean.class) @ConditionalOnMissingBean(MongoRepositoryFactoryBean.class)
@Import(MongoRepositoriesAutoConfigureRegistrar.class) @Import(MongoRepositoriesAutoConfigureRegistrar.class)
@AutoConfigureAfter(MongoAutoConfiguration.class) @AutoConfigureAfter(MongoAutoConfiguration.class)

Loading…
Cancel
Save