DATAJPA-834 - Use less common bean name for EntityManagerBeanDefinitionRegistrarPostProcessor.

Replacing bean name "foo" with more meaningful value injected via constant as a bean probably shouldn't have "foo" as its name when everything else has meaningful values defined in constants. Renamed bean and extracted constant alongside others referenced within the file.

Original pull request: #159.
This commit is contained in:
Andrew Walters
2015-12-03 17:10:06 +00:00
committed by Oliver Gierke
parent 56c7afdef6
commit 9299776b22
2 changed files with 2 additions and 1 deletions

View File

@@ -25,4 +25,5 @@ interface BeanDefinitionNames {
public static final String JPA_MAPPING_CONTEXT_BEAN_NAME = "jpaMappingContext";
public static final String JPA_CONTEXT_BEAN_NAME = "jpaContext";
public static final String EM_BEAN_DEFINITION_REGISTRAR_POST_PROCESSOR_BEAN_NAME = "emBeanDefinitionRegistrarPostProcessor";
}

View File

@@ -164,7 +164,7 @@ public class JpaRepositoryConfigExtension extends RepositoryConfigurationExtensi
Object source = config.getSource();
registerIfNotAlreadyRegistered(new RootBeanDefinition(EntityManagerBeanDefinitionRegistrarPostProcessor.class),
registry, "foo", source);
registry, EM_BEAN_DEFINITION_REGISTRAR_POST_PROCESSOR_BEAN_NAME, source);
registerIfNotAlreadyRegistered(new RootBeanDefinition(JpaMetamodelMappingContextFactoryBean.class), registry,
JPA_MAPPING_CONTEXT_BEAN_NAME, source);