(ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass); wac.setEnvironment(getEnvironment()); wac.setParent(parent); String configLocation = getContextConfigLocation();
(ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass); wac.setEnvironment(getEnvironment()); wac.setParent(parent); String configLocation = getContextConfigLocation();
@Override public void setEnvironment(final ConfigurableEnvironment environment) { this.appContext.setEnvironment(environment); } }
wac.setEnvironment(getEnvironment()); wac.setParent(parent); wac.setConfigLocation(contextConfigLocation);
@Override protected WebApplicationContext createWebApplicationContext(ApplicationContext parent) { if (this.logger.isDebugEnabled()) { this.logger.debug("Servlet with name '" + getServletName() + "' will try to create custom WebApplicationContext context of class '" + CubaXmlWebApplicationContext.class.getName() + "'" + ", using parent context [" + parent + "]"); } ConfigurableWebApplicationContext wac = new CubaXmlWebApplicationContext() { @Override protected ResourcePatternResolver getResourcePatternResolver() { if (dependencyJars == null || dependencyJars.isEmpty()) { throw new RuntimeException("No JARs defined for the 'web' block. " + "Please check that web.dependencies file exists in WEB-INF directory."); } return new SingleAppResourcePatternResolver(this, dependencyJars); } }; wac.setEnvironment(getEnvironment()); wac.setParent(parent); wac.setConfigLocation(getContextConfigLocation()); configureAndRefreshWebApplicationContext(wac); return wac; } }
@Override protected WebApplicationContext createWebApplicationContext(ApplicationContext parent) { if (this.logger.isDebugEnabled()) { this.logger.debug("Servlet with name '" + getServletName() + "' will try to create custom WebApplicationContext context of class '" + CubaXmlWebApplicationContext.class.getName() + "'" + ", using parent context [" + parent + "]"); } ConfigurableWebApplicationContext wac = new CubaXmlWebApplicationContext() { @Override protected ResourcePatternResolver getResourcePatternResolver() { if (dependencyJars == null || dependencyJars.isEmpty()) { throw new RuntimeException("No JARs defined for the 'web' block. " + "Please check that web.dependencies file exists in WEB-INF directory."); } return new SingleAppResourcePatternResolver(this, dependencyJars); } }; wac.setEnvironment(getEnvironment()); wac.setParent(parent); wac.setConfigLocation(getContextConfigLocation()); configureAndRefreshWebApplicationContext(wac); return wac; } }
(ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass); wac.setEnvironment(getEnvironment()); wac.setParent(parent); wac.setConfigLocation(getContextConfigLocation());