Class RepositoryConfigurationDelegate
java.lang.Object
org.springframework.data.repository.config.RepositoryConfigurationDelegate
Delegate for configuration integration to reuse the general way of detecting repositories. Customization is done by
providing a configuration format specific
RepositoryConfigurationSource
(currently either XML or annotations
are supported). The actual registration can then be triggered for different RepositoryConfigurationExtension
s.- Author:
- Oliver Gierke, Jens Schauder, Mark Paluch, Christoph Strobl, John Blum
-
Constructor Summary
ConstructorsConstructorDescriptionRepositoryConfigurationDelegate
(RepositoryConfigurationSource configurationSource, org.springframework.core.io.ResourceLoader resourceLoader, org.springframework.core.env.Environment environment) Creates a newRepositoryConfigurationDelegate
for the givenRepositoryConfigurationSource
andResourceLoader
andEnvironment
. -
Method Summary
Modifier and TypeMethodDescriptionList<org.springframework.beans.factory.parsing.BeanComponentDefinition>
registerRepositoriesIn
(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, RepositoryConfigurationExtension extension) Registers the discovered repositories in the givenBeanDefinitionRegistry
.
-
Constructor Details
-
RepositoryConfigurationDelegate
public RepositoryConfigurationDelegate(RepositoryConfigurationSource configurationSource, org.springframework.core.io.ResourceLoader resourceLoader, org.springframework.core.env.Environment environment) Creates a newRepositoryConfigurationDelegate
for the givenRepositoryConfigurationSource
andResourceLoader
andEnvironment
.- Parameters:
configurationSource
- must not be null.resourceLoader
- must not be null.environment
- must not be null.
-
-
Method Details
-
registerRepositoriesIn
public List<org.springframework.beans.factory.parsing.BeanComponentDefinition> registerRepositoriesIn(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, RepositoryConfigurationExtension extension) Registers the discovered repositories in the givenBeanDefinitionRegistry
.- Parameters:
registry
-BeanDefinitionRegistry
in which to register the repository bean.extension
-RepositoryConfigurationExtension
for the module.- Returns:
BeanComponentDefinition
s for all repository bean definitions found.- See Also:
-
RepositoryConfigurationExtension
BeanDefinitionRegistry
-