Examples of registerBeansForRoot()


Examples of org.springframework.data.repository.config.RepositoryConfigurationExtension.registerBeansForRoot()

  public void registersDefaultBeanPostProcessorsByDefault() {

    DefaultListableBeanFactory factory = new DefaultListableBeanFactory();

    RepositoryConfigurationExtension extension = new JpaRepositoryConfigExtension();
    extension.registerBeansForRoot(factory, configSource);

    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)));
View Full Code Here

Examples of org.springframework.data.repository.config.RepositoryConfigurationExtension.registerBeansForRoot()

  private void assertOnlyOnePersistenceAnnotationBeanPostProcessorRegistered(DefaultListableBeanFactory factory,
      String expectedBeanName) {

    RepositoryConfigurationExtension extension = new JpaRepositoryConfigExtension();
    extension.registerBeansForRoot(factory, configSource);

    assertThat(factory.getBean(expectedBeanName), is(notNullValue()));
    exception.expect(NoSuchBeanDefinitionException.class);
    factory.getBeanDefinition("org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#1");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.