Module spring.data.commons
Class ResourceReaderRepositoryPopulator
java.lang.Object
org.springframework.data.repository.init.ResourceReaderRepositoryPopulator
- All Implemented Interfaces:
Aware,ApplicationEventPublisherAware,RepositoryPopulator
public class ResourceReaderRepositoryPopulator
extends Object
implements RepositoryPopulator, ApplicationEventPublisherAware
- Since:
- 1.4
- Author:
- Oliver Gierke, Christoph Strobl
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newResourceReaderRepositoryPopulatorusing the givenResourceReader.ResourceReaderRepositoryPopulator(ResourceReader reader, ClassLoader classLoader) -
Method Summary
Modifier and TypeMethodDescriptionvoidpopulate(Repositories repositories) Populates the givenRepositories.voidvoidsetResourceLocation(String location) Configures the location of theResources to be used to initialize the repositories.voidsetResources(Resource... resources) Configures theResources to be used to initialize the repositories.
-
Constructor Details
-
ResourceReaderRepositoryPopulator
Creates a newResourceReaderRepositoryPopulatorusing the givenResourceReader.- Parameters:
reader- must not be null.
-
ResourceReaderRepositoryPopulator
- Parameters:
reader- must not be null.classLoader- can be null.
-
-
Method Details
-
setResourceLocation
Configures the location of theResources to be used to initialize the repositories.- Parameters:
location- must not be null or empty.- Throws:
IOException
-
setResources
Configures theResources to be used to initialize the repositories.- Parameters:
resources-
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisherin interfaceApplicationEventPublisherAware
-
populate
Description copied from interface:RepositoryPopulatorPopulates the givenRepositories.- Specified by:
populatein interfaceRepositoryPopulator- Parameters:
repositories- must not be null.
-