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
FactoryBean
s creating ResourceReaderRepositoryPopulator
s. 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
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected ResourceReaderRepositoryPopulator
Class<?>
protected abstract ResourceReader
void
onApplicationEvent
(org.springframework.context.event.ContextRefreshedEvent event) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setResources
(org.springframework.core.io.Resource[] resources) Configures theResource
s 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 theResource
s 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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<ResourceReaderRepositoryPopulator>
- Specified by:
getObjectType
in classorg.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
-
createInstance
- Specified by:
createInstance
in classorg.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) - Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
getResourceReader
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classorg.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
- Throws:
Exception
-