DATALDAP-64 - Export composable repositories via CDI.
We now export composable repositories through our CDI extension. Repositories can now be customized either by a single custom implementation (as it was before) and by providing fragment interfaces along their fragment implementation. This change aligns CDI support with the existing RepositoryFactory support we provide within a Spring application context.
This commit is contained in:
@@ -18,7 +18,7 @@ package org.springframework.data.ldap.repository.cdi;
|
||||
/**
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
interface SampleRepositoryCustom {
|
||||
interface SampleFragment {
|
||||
|
||||
int returnOne();
|
||||
}
|
||||
@@ -18,7 +18,7 @@ package org.springframework.data.ldap.repository.cdi;
|
||||
/**
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
class SampleRepositoryImpl implements SampleRepositoryCustom {
|
||||
class SampleFragmentImpl implements SampleFragment {
|
||||
|
||||
@Override
|
||||
public int returnOne() {
|
||||
@@ -23,4 +23,4 @@ import org.springframework.data.repository.CrudRepository;
|
||||
/**
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public interface SampleRepository extends CrudRepository<DummyEntity, Name>, SampleRepositoryCustom {}
|
||||
public interface SampleRepository extends CrudRepository<DummyEntity, Name>, SampleFragment {}
|
||||
|
||||
Reference in New Issue
Block a user