Code example for AbstractRefreshableWebApplicationContext

Methods: getEnvironment, loadBeanDefinitions

0
        // Create a new XmlBeanDefinitionReader for the given BeanFactory. 
        GroovyBeanDefinitionReader beanDefinitionReader = new GroovyBeanDefinitionReader(beanFactory); 
 
        // Configure the bean definition reader with this context's 
        // resource loading environment. 
        beanDefinitionReader.setEnvironment(this.getEnvironment()); 
        beanDefinitionReader.setResourceLoader(this); 
//        beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this)); 
 
        // Allow a subclass to provide custom initialization of the reader, 
        // then proceed with actually loading the bean definitions. 
        initBeanDefinitionReader(beanDefinitionReader); 
        loadBeanDefinitions(beanDefinitionReader); 
    } 
 
    /** 
     * Initialize the bean definition reader used for loading the bean 
     * definitions of this context. Default implementation is empty. 
     * <p>Can be overridden in subclasses, e.g. for turning off XML validation 
     * or using a different XmlBeanDefinitionParser implementation.