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:
@@ -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;
|
||||
@@ -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));
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user