Example usage for org.springframework.web.context.support GenericWebApplicationContext setClassLoader

List of usage examples for org.springframework.web.context.support GenericWebApplicationContext setClassLoader

Introduction

In this page you can find the example usage for org.springframework.web.context.support GenericWebApplicationContext setClassLoader.

Prototype

@Override
    public void setClassLoader(@Nullable ClassLoader classLoader) 

Source Link

Usage

From source file:org.impalaframework.web.spring.module.BaseWebModuleLoader.java

protected GenericWebApplicationContext newApplicationContext(ModuleDefinition moduleDefinition,
        ApplicationContext parent, ClassLoader classLoader, ServletContext servletContext,
        final DefaultListableBeanFactory beanFactory) {

    final GenericWebApplicationContext context = new GenericWebApplicationContext(beanFactory);
    context.setServletContext(servletContext);
    context.setClassLoader(classLoader);

    context.setParent(parent);/* w  ww  . j  a v a 2 s .com*/
    final String displayName = ModuleLoaderUtils.getDisplayName(moduleDefinition, context);
    context.setDisplayName(displayName);
    return context;
}