Search in sources :

Example 1 with GroovyBeanDefinitionReader

use of org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader in project spring-framework by spring-projects.

the class GroovyWebApplicationContext method loadBeanDefinitions.

/**
	 * Loads the bean definitions via an GroovyBeanDefinitionReader.
	 * @see org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader
	 * @see #initBeanDefinitionReader
	 * @see #loadBeanDefinitions
	 */
@Override
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws BeansException, IOException {
    // 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(getEnvironment());
    beanDefinitionReader.setResourceLoader(this);
    // Allow a subclass to provide custom initialization of the reader,
    // then proceed with actually loading the bean definitions.
    initBeanDefinitionReader(beanDefinitionReader);
    loadBeanDefinitions(beanDefinitionReader);
}
Also used : GroovyBeanDefinitionReader(org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader)

Aggregations

GroovyBeanDefinitionReader (org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader)1