Delegate ClassLoader with Tomcat

Use standard class loading delegation with Tomcat.
This commit is contained in:
Phillip Webb
2013-08-24 10:13:33 -07:00
parent 1c1f36c4ce
commit 1db12f5912

View File

@@ -152,6 +152,7 @@ public class TomcatEmbeddedServletContainerFactory extends
.getClassLoader() : ClassUtils.getDefaultClassLoader());
WebappLoader loader = new WebappLoader(context.getParentClassLoader());
loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName());
loader.setDelegate(true);
context.setLoader(loader);
if (isRegisterDefaultServlet()) {
addDefaultServlet(context);