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
ConstructorDescriptionCreates a newResourceReaderRepositoryPopulator
using the givenResourceReader
.ResourceReaderRepositoryPopulator
(ResourceReader reader, ClassLoader classLoader) -
Method Summary
Modifier and TypeMethodDescriptionvoid
populate
(Repositories repositories) Populates the givenRepositories
.void
void
setResourceLocation
(String location) Configures the location of theResource
s to be used to initialize the repositories.void
setResources
(Resource... resources) Configures theResource
s to be used to initialize the repositories.
-
Constructor Details
-
ResourceReaderRepositoryPopulator
Creates a newResourceReaderRepositoryPopulator
using 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 theResource
s to be used to initialize the repositories.- Parameters:
location
- must not be null or empty.- Throws:
IOException
-
setResources
Configures theResource
s to be used to initialize the repositories.- Parameters:
resources
-
-
setApplicationEventPublisher
- Specified by:
setApplicationEventPublisher
in interfaceApplicationEventPublisherAware
-
populate
Description copied from interface:RepositoryPopulator
Populates the givenRepositories
.- Specified by:
populate
in interfaceRepositoryPopulator
- Parameters:
repositories
- must not be null.
-