DATACMNS-891 - Repository bean definition registration now exposes repository type in metadata.
We now set an explicit attribute on the BeanDefinition created for every repository factory to allow BeanFactoryPostProcessors to inspect those.
This commit is contained in:
@@ -50,6 +50,8 @@ public class RepositoryConfigurationDelegate {
|
||||
private static final String MULTIPLE_MODULES = "Multiple Spring Data modules found, entering strict repository configuration mode!";
|
||||
private static final String MODULE_DETECTION_PACKAGE = "org.springframework.data.**.repository.support";
|
||||
|
||||
static final String FACTORY_BEAN_OBJECT_TYPE = "factoryBeanObjectType";
|
||||
|
||||
private final RepositoryConfigurationSource configurationSource;
|
||||
private final ResourceLoader resourceLoader;
|
||||
private final Environment environment;
|
||||
@@ -140,6 +142,8 @@ public class RepositoryConfigurationDelegate {
|
||||
configuration.getRepositoryInterface(), extension.getRepositoryFactoryClassName());
|
||||
}
|
||||
|
||||
beanDefinition.setAttribute(FACTORY_BEAN_OBJECT_TYPE, configuration.getRepositoryInterface());
|
||||
|
||||
registry.registerBeanDefinition(beanName, beanDefinition);
|
||||
definitions.add(new BeanComponentDefinition(beanDefinition, beanName));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user