Skip to content

Commit c3bf658

Browse files
author
Costin Leau
committed
SPR-6102
+ add old method for backwards compatibility
1 parent af0a529 commit c3bf658

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/FrameworkServlet.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,20 @@ protected WebApplicationContext createWebApplicationContext(ApplicationContext p
445445
return wac;
446446
}
447447

448+
/**
449+
* Instantiate the WebApplicationContext for this servlet, either a default
450+
* {@link org.springframework.web.context.support.XmlWebApplicationContext}
451+
* or a {@link #setContextClass custom context class}, if set.
452+
* Delegates to #createWebApplicationContext(ApplicationContext).
453+
* @param parent the parent WebApplicationContext to use, or <code>null</code> if none
454+
* @return the WebApplicationContext for this servlet
455+
* @see org.springframework.web.context.support.XmlWebApplicationContext
456+
* @see #createWebApplicationContext(ApplicationContext)
457+
*/
458+
protected WebApplicationContext createWebApplicationContext(WebApplicationContext parent) {
459+
return createWebApplicationContext((ApplicationContext) parent);
460+
}
461+
448462
/**
449463
* Post-process the given WebApplicationContext before it is refreshed
450464
* and activated as context for this servlet.

0 commit comments

Comments
 (0)