DATAMONGO-802 - Changed return type of AbstractMongoConfiguration.mongoDbFactroy().

Changed the return type of said method to MongoDbFactory to allow subclasses to return a completely different implementation class.
This commit is contained in:
Oliver Gierke
2013-11-24 19:19:08 +01:00
parent e44d1f5f9a
commit b88d960893

View File

@@ -28,6 +28,7 @@ import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.data.annotation.Persistent;
import org.springframework.data.authentication.UserCredentials;
import org.springframework.data.mapping.context.MappingContextIsNewStrategyFactory;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
import org.springframework.data.mongodb.core.convert.CustomConversions;
@@ -101,7 +102,7 @@ public abstract class AbstractMongoConfiguration {
* @throws Exception
*/
@Bean
public SimpleMongoDbFactory mongoDbFactory() throws Exception {
public MongoDbFactory mongoDbFactory() throws Exception {
return new SimpleMongoDbFactory(mongo(), getDatabaseName(), getUserCredentials(), getAuthenticationDatabaseName());
}