当前位置: 首页>>代码示例>>Java>>正文


Java XmlBeanDefinitionReader.setDocumentLoader方法代码示例

本文整理汇总了Java中org.springframework.beans.factory.xml.XmlBeanDefinitionReader.setDocumentLoader方法的典型用法代码示例。如果您正苦于以下问题:Java XmlBeanDefinitionReader.setDocumentLoader方法的具体用法?Java XmlBeanDefinitionReader.setDocumentLoader怎么用?Java XmlBeanDefinitionReader.setDocumentLoader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.beans.factory.xml.XmlBeanDefinitionReader的用法示例。


在下文中一共展示了XmlBeanDefinitionReader.setDocumentLoader方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; //导入方法依赖的package包/类
protected void setUp() throws Exception {
	bundleContext = new MockBundleContext();
	applicationContext = new GenericApplicationContext();
	applicationContext.setClassLoader(getClass().getClassLoader());
	applicationContext.getBeanFactory().addBeanPostProcessor(new BundleContextAwareProcessor(bundleContext));
	applicationContext.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() {

		public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
			beanFactory.addPropertyEditorRegistrar(new BlueprintEditorRegistrar());
		}
	});
	reader = new XmlBeanDefinitionReader(applicationContext);
	reader.setDocumentLoader(new PublicBlueprintDocumentLoader());
	reader.loadBeanDefinitions(new ClassPathResource(getConfig(), getClass()));
	applicationContext.refresh();
	blueprintContainer = new SpringBlueprintContainer(applicationContext);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:18,代码来源:BaseMetadataTest.java

示例2: setUp

import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; //导入方法依赖的package包/类
protected void setUp() throws Exception {
	bundleContext = new MockBundleContext();

	context = new GenericApplicationContext();
	context.setClassLoader(getClass().getClassLoader());
	context.getBeanFactory().addBeanPostProcessor(new BundleContextAwareProcessor(bundleContext));
	context.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() {

		public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
			beanFactory.addPropertyEditorRegistrar(new BlueprintEditorRegistrar());
		}
	});

	reader = new XmlBeanDefinitionReader(context);
	reader.setDocumentLoader(new PublicBlueprintDocumentLoader());
	reader.loadBeanDefinitions(new ClassPathResource(CONFIG, getClass()));
	context.refresh();

	blueprintContainer = new SpringBlueprintContainer(context);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:21,代码来源:NestedDefinitionMetadataTest.java

示例3: setUp

import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; //导入方法依赖的package包/类
protected void setUp() throws Exception {
	bundleContext = new MockBundleContext();

	context = new GenericApplicationContext();
	context.setClassLoader(getClass().getClassLoader());
	context.getBeanFactory().addBeanPostProcessor(new BundleContextAwareProcessor(bundleContext));
	SpringBlueprintConverterService converterService =
			new SpringBlueprintConverterService(null, context.getBeanFactory());
	converterService.add(new GenericConverter());
	context.getBeanFactory().setConversionService(converterService);

	reader = new XmlBeanDefinitionReader(context);
	reader.setDocumentLoader(new PublicBlueprintDocumentLoader());
	reader.loadBeanDefinitions(new ClassPathResource(CONFIG, getClass()));
	context.refresh();

	blueprintContainer = new SpringBlueprintContainer(context);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:19,代码来源:GenericsTest.java

示例4: setUp

import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; //导入方法依赖的package包/类
protected void setUp() throws Exception {
	bundleContext = new MockBundleContext();

	context = new GenericApplicationContext();
	context.setClassLoader(getClass().getClassLoader());
	context.getBeanFactory().addBeanPostProcessor(new BundleContextAwareProcessor(bundleContext));
	context.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() {

		public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
			beanFactory.addPropertyEditorRegistrar(new BlueprintEditorRegistrar());
			beanFactory.registerSingleton("blueprintContainer",
					new SpringBlueprintContainer(context));
		}
	});

	reader = new XmlBeanDefinitionReader(context);
	reader.setDocumentLoader(new PublicBlueprintDocumentLoader());
	reader.loadBeanDefinitions(new ClassPathResource(CONFIG, getClass()));
	context.refresh();

	blueprintContainer = new SpringBlueprintContainer(context);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:23,代码来源:TestLazyBeansTest.java

示例5: setUp

import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; //导入方法依赖的package包/类
protected void setUp() throws Exception {
	bundleContext = new MockBundleContext();

	context = new GenericApplicationContext();
	context.setClassLoader(getClass().getClassLoader());
	context.getBeanFactory().setConversionService(
			new SpringBlueprintConverterService(null, context.getBeanFactory()));
	context.getBeanFactory().addBeanPostProcessor(new BundleContextAwareProcessor(bundleContext));

	reader = new XmlBeanDefinitionReader(context);
	reader.setDocumentLoader(new PublicBlueprintDocumentLoader());
	reader.loadBeanDefinitions(new ClassPathResource(CONFIG, getClass()));
	context.refresh();

	blueprintContainer = new SpringBlueprintContainer(context);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:17,代码来源:TestBlueprintBuiltinConvertersTest.java

示例6: setUp

import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; //导入方法依赖的package包/类
protected void setUp() throws Exception {
	context = new GenericApplicationContext();
	context.setClassLoader(getClass().getClassLoader());
	reader = new XmlBeanDefinitionReader(context);
	reader.setDocumentLoader(new PublicBlueprintDocumentLoader());
	reader.loadBeanDefinitions(new ClassPathResource(CONFIG, getClass()));
	context.getBeanFactory().setConversionService(new SpringBlueprintConverterService(null, context.getBeanFactory()));
	context.refresh();
	container = new SpringBlueprintContainer(context);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:11,代码来源:ConstructorInjectionTest.java

示例7: setUp

import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; //导入方法依赖的package包/类
protected void setUp() throws Exception {
	context = new GenericApplicationContext();
	context.setClassLoader(getClass().getClassLoader());
	reader = new XmlBeanDefinitionReader(context);
	reader.setDocumentLoader(new PublicBlueprintDocumentLoader());
	reader.loadBeanDefinitions(new ClassPathResource(CONFIG, getClass()));
	context.refresh();
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:9,代码来源:SchemaWithLocationTest.java

示例8: setUp

import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; //导入方法依赖的package包/类
protected void setUp() throws Exception {
	bundleContext = new MockBundleContext();

	context = new GenericApplicationContext();
	context.setClassLoader(getClass().getClassLoader());
	context.getBeanFactory().addBeanPostProcessor(new BundleContextAwareProcessor(bundleContext));
	context.addBeanFactoryPostProcessor(new CycleOrderingProcessor());
	reader = new XmlBeanDefinitionReader(context);
	reader.setDocumentLoader(new PublicBlueprintDocumentLoader());
	reader.loadBeanDefinitions(new ClassPathResource(CONFIG, getClass()));
	context.refresh();

	blueprintContainer = new SpringBlueprintContainer(context);
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:15,代码来源:CycleTest.java


注:本文中的org.springframework.beans.factory.xml.XmlBeanDefinitionReader.setDocumentLoader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。