@Test public void testImportedContext() throws Exception { logger.info("testImportedContext()"); WarMachine war = TestHelpers.createWarMachine(WarNames.SPRING_SPLIT_CONFIG); SpringContext ctx = new SpringContext(war, "/WEB-INF/spring/servletContext.xml"); assertEquals("bean from base context", "com.kdgregory.pathfinder.test.spring2.ControllerA", ctx.getBean("controllerA").getBeanClass()); assertEquals("bean from imported context", "com.kdgregory.pathfinder.test.spring2.ControllerB", ctx.getBean("controllerB").getBeanClass()); }
public BeanDefinition getBean(String name) { BeanDefinition def = beanDefinitionsById.get(name); if (def == null) def = beanDefinitionsByName.get(name); return def; }
SpringContext { public BeanDefinition getBean(String name) { BeanDefinition def = beanDefinitionsById.get(name); if (def == null) def = beanDefinitionsByName.get(name); return def; } }
SpringContext { public BeanDefinition getBean(String name) { BeanDefinition def = beanDefinitionsById.get(name); if (def == null) def = beanDefinitionsByName.get(name); return def; } SpringContext(WarMachine war, String contextLocation);  SpringContext(SpringContext parent, WarMachine war, String contextLocation); }
SpringContext { public BeanDefinition getBean(String name) { BeanDefinition def = beanDefinitionsById.get(name); if (def == null) def = beanDefinitionsByName.get(name); return def; } SpringContext(WarMachine war, String contextLocation);  SpringContext(SpringContext parent, WarMachine war, String contextLocation); Map<String,BeanDefinition> getBeans(); BeanDefinition getBean(String name); List<BeanDefinition> getBeansByClass(String className); }
SpringContext { public BeanDefinition getBean(String name) { BeanDefinition def = beanDefinitionsById.get(name); if (def == null) def = beanDefinitionsByName.get(name); return def; } SpringContext(WarMachine war, String contextLocation);  SpringContext(SpringContext parent, WarMachine war, String contextLocation); Map<String,BeanDefinition> getBeans(); BeanDefinition getBean(String name); List<BeanDefinition> getBeansByClass(String className);  }