mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 05:49:04 +00:00
child bean definition's scope attribute can be inherited from parent bean definition now (SPR-3542)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2363 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+2
-2
@@ -1972,7 +1972,7 @@ public final class DefaultListableBeanFactoryTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testImplicitScopeInheritanceForChildBeanDefinitions() throws Exception {
|
||||
public void testScopeInheritanceForChildBeanDefinitions() throws Exception {
|
||||
RootBeanDefinition parent = new RootBeanDefinition();
|
||||
parent.setScope("bonanza!");
|
||||
|
||||
@@ -1984,7 +1984,7 @@ public final class DefaultListableBeanFactoryTests {
|
||||
factory.registerBeanDefinition("child", child);
|
||||
|
||||
BeanDefinition def = factory.getMergedBeanDefinition("child");
|
||||
assertTrue("Child 'scope' not overriding parent scope (it must).", def.isSingleton());
|
||||
assertEquals("Child 'scope' not inherited", "bonanza!", def.getScope());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user