DATACMNS-29 - Added getRepositoryInterface() implementation to RepositoryConfig.
We now assume scanning for all sub-interfaces of Repository by default now. Thus concrete modules can pretty much drop the implementation of this method in their concrete config implementations in case they support picking up user's repository interfaces that extend Repository only. From a users perspective this drops the requirement to extend a persistence technology specific interface (MongoRepository, JpaRepository and the like).
This commit is contained in:
@@ -19,6 +19,7 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.data.repository.Repository;
|
||||
import org.springframework.data.repository.query.QueryLookupStrategy.Key;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -186,6 +187,14 @@ public abstract class RepositoryConfig<T extends SingleRepositoryConfigInformati
|
||||
|
||||
return infos;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.GlobalRepositoryConfigInformation#getRepositoryBaseInterface()
|
||||
*/
|
||||
public Class<?> getRepositoryBaseInterface() {
|
||||
return Repository.class;
|
||||
}
|
||||
|
||||
|
||||
private Collection<Element> getRepositoryElements() {
|
||||
|
||||
Reference in New Issue
Block a user