Perform setParent's Environment merging for ClassPathXmlApplicationContext etc constructors with parent argument as well

Issue: SPR-11068
(cherry picked from commit c5fcf19)
This commit is contained in:
Juergen Hoeller
2013-11-05 14:18:14 +01:00
parent 70907fd326
commit 863570abb7

View File

@@ -217,7 +217,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
* Create a new AbstractApplicationContext with no parent.
*/
public AbstractApplicationContext() {
this(null);
this.resourcePatternResolver = getResourcePatternResolver();
}
/**
@@ -225,8 +225,8 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
* @param parent the parent context
*/
public AbstractApplicationContext(ApplicationContext parent) {
this.parent = parent;
this.resourcePatternResolver = getResourcePatternResolver();
this();
setParent(parent);
}