DATAJPA-638 - Improve bean definition registration for root configuration element.

We now make sure wo register shared bean definitions only once for all usages of a root configuration element (XML or annotation).

Related ticket: DATACMNS-609.
This commit is contained in:
Oliver Gierke
2014-12-01 10:12:05 +01:00
parent 9b801c7b50
commit 6d08654917
2 changed files with 8 additions and 13 deletions

View File

@@ -53,7 +53,6 @@ import org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcesso
public class JpaRepositoryConfigExtensionUnitTests {
private static final String RIABPP_CLASS_NAME = "org.springframework.data.repository.core.support.RepositoryInterfaceAwareBeanPostProcessor";
private static final String PABPP_CLASS_NAME = "org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor";
@Mock RepositoryConfigurationSource configSource;
@@ -69,8 +68,8 @@ public class JpaRepositoryConfigExtensionUnitTests {
Iterable<String> names = Arrays.asList(factory.getBeanDefinitionNames());
assertThat(names, Matchers.<String> hasItem(Matchers.startsWith(PABPP_CLASS_NAME)));
assertThat(names, Matchers.<String> hasItem(Matchers.startsWith(RIABPP_CLASS_NAME)));
assertThat(names, Matchers.<String> hasItem(AnnotationConfigUtils.PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME));
assertThat(names, Matchers.<String> hasItem(RIABPP_CLASS_NAME));
}
@Test