Merge branch 'master' of github.com:SpringSource/spring-gemfire
This commit is contained in:
@@ -74,7 +74,7 @@ public class GemfireRepositoryConfigurationExtension extends RepositoryConfigura
|
||||
String mappingContextRef = element.getAttribute(MAPPING_CONTEXT_REF);
|
||||
|
||||
if (StringUtils.hasText(mappingContextRef)) {
|
||||
builder.addPropertyReference("mappingContext", mappingContextRef);
|
||||
builder.addPropertyReference("gemfireMappingContext", mappingContextRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.data.gemfire.mapping.GemfireMappingContext;
|
||||
import org.springframework.data.gemfire.mapping.GemfirePersistentEntity;
|
||||
import org.springframework.data.gemfire.mapping.GemfirePersistentProperty;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
@@ -63,7 +64,7 @@ public class GemfireRepositoryFactoryBean<T extends Repository<S, ID>, S, ID ext
|
||||
*
|
||||
* @param context the context to set
|
||||
*/
|
||||
public void setMappingContext(
|
||||
public void setGemfireMappingContext(
|
||||
MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> context) {
|
||||
this.context = context;
|
||||
}
|
||||
@@ -79,4 +80,19 @@ public class GemfireRepositoryFactoryBean<T extends Repository<S, ID>, S, ID ext
|
||||
protected RepositoryFactorySupport createRepositoryFactory() {
|
||||
return new GemfireRepositoryFactory(regions, context);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
|
||||
if (this.context == null) {
|
||||
this.context = new GemfireMappingContext();
|
||||
setMappingContext(context);
|
||||
}
|
||||
|
||||
super.afterPropertiesSet();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user