Java Code Examples for org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader#loadBeanDefinitions()

The following examples show how to use org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader#loadBeanDefinitions() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpringInitializer.java    From Mycat-openEP with Apache License 2.0 5 votes vote down vote up
private static void initGroovyConf(GenericApplicationContext context){
	String classPath=ProcessInfo.getGroovyClassPath();
	if(Help.isNotEmpty(classPath)){
		GroovyBeanDefinitionReader reader=new GroovyBeanDefinitionReader(context);
		reader.loadBeanDefinitions(new ClassPathResource(classPath));
	}
}
 
Example 2
Source File: GroovyWebApplicationContext.java    From spring-analysis-note with MIT License 3 votes vote down vote up
/**
 * Load the bean definitions with the given GroovyBeanDefinitionReader.
 * <p>The lifecycle of the bean factory is handled by the refreshBeanFactory method;
 * therefore this method is just supposed to load and/or register bean definitions.
 * <p>Delegates to a ResourcePatternResolver for resolving location patterns
 * into Resource instances.
 * @throws IOException if the required Groovy script or XML file isn't found
 * @see #refreshBeanFactory
 * @see #getConfigLocations
 * @see #getResources
 * @see #getResourcePatternResolver
 */
protected void loadBeanDefinitions(GroovyBeanDefinitionReader reader) throws IOException {
	String[] configLocations = getConfigLocations();
	if (configLocations != null) {
		for (String configLocation : configLocations) {
			reader.loadBeanDefinitions(configLocation);
		}
	}
}
 
Example 3
Source File: GroovyWebApplicationContext.java    From java-technology-stack with MIT License 3 votes vote down vote up
/**
 * Load the bean definitions with the given GroovyBeanDefinitionReader.
 * <p>The lifecycle of the bean factory is handled by the refreshBeanFactory method;
 * therefore this method is just supposed to load and/or register bean definitions.
 * <p>Delegates to a ResourcePatternResolver for resolving location patterns
 * into Resource instances.
 * @throws IOException if the required Groovy script or XML file isn't found
 * @see #refreshBeanFactory
 * @see #getConfigLocations
 * @see #getResources
 * @see #getResourcePatternResolver
 */
protected void loadBeanDefinitions(GroovyBeanDefinitionReader reader) throws IOException {
	String[] configLocations = getConfigLocations();
	if (configLocations != null) {
		for (String configLocation : configLocations) {
			reader.loadBeanDefinitions(configLocation);
		}
	}
}
 
Example 4
Source File: GroovyWebApplicationContext.java    From lams with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Load the bean definitions with the given GroovyBeanDefinitionReader.
 * <p>The lifecycle of the bean factory is handled by the refreshBeanFactory method;
 * therefore this method is just supposed to load and/or register bean definitions.
 * <p>Delegates to a ResourcePatternResolver for resolving location patterns
 * into Resource instances.
 * @throws IOException if the required Groovy script or XML file isn't found
 * @see #refreshBeanFactory
 * @see #getConfigLocations
 * @see #getResources
 * @see #getResourcePatternResolver
 */
protected void loadBeanDefinitions(GroovyBeanDefinitionReader reader) throws IOException {
	String[] configLocations = getConfigLocations();
	if (configLocations != null) {
		for (String configLocation : configLocations) {
			reader.loadBeanDefinitions(configLocation);
		}
	}
}
 
Example 5
Source File: GroovyWebApplicationContext.java    From spring4-understanding with Apache License 2.0 3 votes vote down vote up
/**
 * Load the bean definitions with the given GroovyBeanDefinitionReader.
 * <p>The lifecycle of the bean factory is handled by the refreshBeanFactory method;
 * therefore this method is just supposed to load and/or register bean definitions.
 * <p>Delegates to a ResourcePatternResolver for resolving location patterns
 * into Resource instances.
 * @throws IOException if the required Groovy script or XML file isn't found
 * @see #refreshBeanFactory
 * @see #getConfigLocations
 * @see #getResources
 * @see #getResourcePatternResolver
 */
protected void loadBeanDefinitions(GroovyBeanDefinitionReader reader) throws IOException {
	String[] configLocations = getConfigLocations();
	if (configLocations != null) {
		for (String configLocation : configLocations) {
			reader.loadBeanDefinitions(configLocation);
		}
	}
}