當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。