Class AbstractRepositoryPopulatorFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<ResourceReaderRepositoryPopulator>
org.springframework.data.repository.init.AbstractRepositoryPopulatorFactoryBean
- All Implemented Interfaces:
EventListener
,Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<ResourceReaderRepositoryPopulator>
,InitializingBean
,ApplicationContextAware
,ApplicationListener<ContextRefreshedEvent>
- Direct Known Subclasses:
Jackson2RepositoryPopulatorFactoryBean
,UnmarshallerRepositoryPopulatorFactoryBean
public abstract class AbstractRepositoryPopulatorFactoryBean
extends AbstractFactoryBean<ResourceReaderRepositoryPopulator>
implements ApplicationListener<ContextRefreshedEvent>, 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected ResourceReaderRepositoryPopulator
Class<?>
protected abstract ResourceReader
void
void
setApplicationContext
(ApplicationContext applicationContext) void
setResources
(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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
AbstractRepositoryPopulatorFactoryBean
public AbstractRepositoryPopulatorFactoryBean()
-
-
Method Details
-
setResources
Configures theResource
s to be used to load objects from and initialize the repositories eventually.- Parameters:
resources
- must not be null.
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<ResourceReaderRepositoryPopulator>
- Specified by:
getObjectType
in classAbstractFactoryBean<ResourceReaderRepositoryPopulator>
-
createInstance
- Specified by:
createInstance
in classAbstractFactoryBean<ResourceReaderRepositoryPopulator>
-
onApplicationEvent
- Specified by:
onApplicationEvent
in interfaceApplicationListener<ContextRefreshedEvent>
-
getResourceReader
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Overrides:
afterPropertiesSet
in classAbstractFactoryBean<ResourceReaderRepositoryPopulator>
- Throws:
Exception
-