DATAGEODE-89 - 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:58:53 +01:00
parent b5c7d9d8c2
commit d8396689a0
4 changed files with 7 additions and 12 deletions

View File

@@ -22,10 +22,11 @@ package org.springframework.data.gemfire.repository.cdi;
* supporting additional data access (CRUD) operations on people.
*
* @author John Blum
* @author Mark Paluch
* @see org.springframework.data.gemfire.repository.cdi.CustomPersonRepository
* @since 1.8.0
*/
public class SamplePersonRepositoryImpl implements CustomPersonRepository {
public class CustomPersonRepositoryImpl implements CustomPersonRepository {
public int returnOne() {
return 1;

View File

@@ -335,7 +335,7 @@ public class GemfireRepositoryBeanTest {
};
GemfireRepository<Person, Long> gemfireRepository =
repositoryBean.create(null, PersonRepository.class, Optional.empty());
repositoryBean.create(null, PersonRepository.class);
assertThat(gemfireRepository, is(notNullValue()));
assertThat(repositoryProxyPostProcessed.get(), is(true));

View File

@@ -28,7 +28,7 @@ import org.springframework.data.gemfire.repository.sample.Person;
* @author John Blum
* @see org.springframework.data.gemfire.repository.GemfireRepository
* @see org.springframework.data.gemfire.repository.cdi.CustomPersonRepository
* @see org.springframework.data.gemfire.repository.cdi.SamplePersonRepositoryImpl
* @see org.springframework.data.gemfire.repository.cdi.CustomPersonRepositoryImpl
* @see org.springframework.data.gemfire.repository.sample.Person
* @since 1.8.0
*/