Package org.springframework.context.annotation

Examples of org.springframework.context.annotation.AnnotationConfigApplicationContext.containsLocalBean()


    dispatcherCtx.refresh();

    assertTrue(ctx.containsLocalBean("fooBean"));
    assertFalse(ctx.containsLocalBean("fooController"));

    assertFalse(dispatcherCtx.containsLocalBean("fooBean"));
    assertTrue(dispatcherCtx.containsLocalBean("fooController"));
  }

}
View Full Code Here


    assertTrue(ctx.containsLocalBean("fooBean"));
    assertFalse(ctx.containsLocalBean("fooController"));

    assertFalse(dispatcherCtx.containsLocalBean("fooBean"));
    assertTrue(dispatcherCtx.containsLocalBean("fooController"));
  }

}
View Full Code Here

    this.context.refresh();
    AnnotationConfigApplicationContext childContext = new AnnotationConfigApplicationContext();
    childContext.setParent(this.context);
    childContext.register(HierarchyConsidered.class);
    childContext.refresh();
    assertFalse(childContext.containsLocalBean("bar"));
  }

  @Test
  public void hierarchyNotConsidered() throws Exception {
    this.context.register(FooConfiguration.class);
View Full Code Here

    this.context.refresh();
    AnnotationConfigApplicationContext childContext = new AnnotationConfigApplicationContext();
    childContext.setParent(this.context);
    childContext.register(HierarchyNotConsidered.class);
    childContext.refresh();
    assertTrue(childContext.containsLocalBean("bar"));
  }

  @Test
  public void impliedOnBeanMethod() throws Exception {
    this.context.register(ExampleBeanConfiguration.class, ImpliedOnBeanMethod.class);
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.