org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader#loadBeanDefinitions ( )源码实例Demo

下面列出了org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader#loadBeanDefinitions ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: Mycat-openEP   文件: SpringInitializer.java
private static void initGroovyConf(GenericApplicationContext context){
	String classPath=ProcessInfo.getGroovyClassPath();
	if(Help.isNotEmpty(classPath)){
		GroovyBeanDefinitionReader reader=new GroovyBeanDefinitionReader(context);
		reader.loadBeanDefinitions(new ClassPathResource(classPath));
	}
}
 
/**
 * 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);
		}
	}
}
 
/**
 * 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);
		}
	}
}
 
源代码4 项目: lams   文件: GroovyWebApplicationContext.java
/**
 * 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);
		}
	}
}
 
/**
 * 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);
		}
	}
}