DATACMNS-29 - Adapted changes in Spring Data Commons.
User repository interfaces are not required to implement MongoRepository anymore. Added missing override for save(Iterable<? extends T> entities) to return a List<T>.
This commit is contained in:
@@ -28,11 +28,8 @@ import org.springframework.data.document.mongodb.MongoTemplate;
|
||||
import org.springframework.data.document.mongodb.convert.MappingMongoConverter;
|
||||
import org.springframework.data.document.mongodb.mapping.Document;
|
||||
import org.springframework.data.document.mongodb.mapping.MongoMappingContext;
|
||||
import org.springframework.data.document.mongodb.mapping.MongoPersistentEntity;
|
||||
import org.springframework.data.document.mongodb.mapping.MongoPersistentEntityIndexCreator;
|
||||
import org.springframework.data.document.mongodb.mapping.MongoPersistentProperty;
|
||||
import org.springframework.data.mapping.context.MappingContextAwareBeanPostProcessor;
|
||||
import org.springframework.data.mapping.model.MappingContext;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.document.mongodb.config;
|
||||
|
||||
import org.springframework.data.document.mongodb.repository.MongoRepository;
|
||||
import org.springframework.data.document.mongodb.repository.MongoRepositoryFactoryBean;
|
||||
import org.springframework.data.repository.config.AutomaticRepositoryConfigInformation;
|
||||
import org.springframework.data.repository.config.ManualRepositoryConfigInformation;
|
||||
@@ -85,19 +84,6 @@ public class SimpleMongoRepositoryConfiguration extends RepositoryConfig<SimpleM
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.data.repository.config.GlobalRepositoryConfigInformation
|
||||
* #getRepositoryBaseInterface()
|
||||
*/
|
||||
public Class<?> getRepositoryBaseInterface() {
|
||||
|
||||
return MongoRepository.class;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
@@ -28,6 +28,13 @@ import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
*/
|
||||
public interface MongoRepository<T, ID extends Serializable> extends PagingAndSortingRepository<T, ID> {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.data.repository.Repository#save(java.lang.Iterable)
|
||||
*/
|
||||
List<T> save(Iterable<? extends T> entites);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.springframework.data.document.mongodb.query.Index;
|
||||
import org.springframework.data.document.mongodb.query.Order;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mapping.model.MappingContext;
|
||||
import org.springframework.data.repository.Repository;
|
||||
import org.springframework.data.repository.query.QueryLookupStrategy;
|
||||
import org.springframework.data.repository.query.QueryLookupStrategy.Key;
|
||||
import org.springframework.data.repository.query.RepositoryQuery;
|
||||
@@ -52,7 +53,7 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class MongoRepositoryFactoryBean<T extends MongoRepository<S, ID>, S, ID extends Serializable> extends
|
||||
public class MongoRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable> extends
|
||||
RepositoryFactoryBeanSupport<T, S, ID> {
|
||||
|
||||
private MongoTemplate template;
|
||||
|
||||
Reference in New Issue
Block a user