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:
Mark Paluch
2018-03-12 16:31:13 +01:00
parent f73a1bdd1e
commit 3c47cd0e1c
4 changed files with 14 additions and 8 deletions

View File

@@ -18,7 +18,7 @@ package org.springframework.data.ldap.repository.cdi;
/**
* @author Mark Paluch
*/
interface SampleRepositoryCustom {
interface SampleFragment {
int returnOne();
}

View File

@@ -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() {

View File

@@ -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 {}