Skip to content

Commit a87fda5

Browse files
Nugsodrotbohm
authored andcommitted
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.
1 parent f77432d commit a87fda5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/java/org/springframework/data/jpa/repository/config/BeanDefinitionNames.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@
2424
interface BeanDefinitionNames {
2525

2626
public static final String JPA_MAPPING_CONTEXT_BEAN_NAME = "jpaMappingContext";
27+
public static final String EM_BEAN_DEFINITION_REGISTRAR_POST_PROCESSOR_BEAN_NAME = "emBeanDefinitionRegistrarPostProcessor";
2728
}

src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public void registerBeansForRoot(BeanDefinitionRegistry registry, RepositoryConf
163163
Object source = config.getSource();
164164

165165
registerIfNotAlreadyRegistered(new RootBeanDefinition(EntityManagerBeanDefinitionRegistrarPostProcessor.class),
166-
registry, "foo", source);
166+
registry, EM_BEAN_DEFINITION_REGISTRAR_POST_PROCESSOR_BEAN_NAME, source);
167167

168168
registerIfNotAlreadyRegistered(new RootBeanDefinition(JpaMetamodelMappingContextFactoryBean.class), registry,
169169
JPA_MAPPING_CONTEXT_BEAN_NAME, source);

0 commit comments

Comments
 (0)