Class AbstractRepositoryPopulatorFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
org.springframework.data.repository.init.AbstractRepositoryPopulatorFactoryBean
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<ResourceReaderRepositoryPopulator>,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
- Direct Known Subclasses:
Jackson2RepositoryPopulatorFactoryBean,UnmarshallerRepositoryPopulatorFactoryBean
public abstract class AbstractRepositoryPopulatorFactoryBean
extends org.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.context.ApplicationContextAware
Base class for
FactoryBeans creating ResourceReaderRepositoryPopulators. Sub-classes have to provide
a ResourceReader to hand into the RepositoryPopulator instance created.- Author:
- Oliver Gierke, Christoph Strobl, Johannes Englmeier
-
Field Summary
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected ResourceReaderRepositoryPopulatorClass<?>protected abstract ResourceReadervoidonApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetResources(org.springframework.core.io.Resource[] resources) Configures theResources to be used to load objects from and initialize the repositories eventually.Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
AbstractRepositoryPopulatorFactoryBean
public AbstractRepositoryPopulatorFactoryBean()
-
-
Method Details
-
setResources
public void setResources(org.springframework.core.io.Resource[] resources) Configures theResources to be used to load objects from and initialize the repositories eventually.- Parameters:
resources- must not be null.
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<ResourceReaderRepositoryPopulator>- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
-
createInstance
- Specified by:
createInstancein classorg.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
getResourceReader
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classorg.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>- Throws:
Exception
-