本文整理匯總了Java中org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException類的典型用法代碼示例。如果您正苦於以下問題:Java XmlBeanDefinitionStoreException類的具體用法?Java XmlBeanDefinitionStoreException怎麽用?Java XmlBeanDefinitionStoreException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
XmlBeanDefinitionStoreException類屬於org.springframework.beans.factory.xml包,在下文中一共展示了XmlBeanDefinitionStoreException類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadVisualizationFile
import org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException; //導入依賴的package包/類
protected void loadVisualizationFile(File file) {
try {
FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(new String[]{file.getPath()}, false);
context.setClassLoader(getClass().getClassLoader());
context.refresh();
Map beans = context.getBeansOfType(IVisualization.class);
for (Object key : beans.keySet()) {
IVisualization vis = (IVisualization)beans.get(key);
if (vis.getOrder() >= 0) {
visualizations.add(vis);
}
}
} catch (XmlBeanDefinitionStoreException e) {
// TODO: introduce logging
e.printStackTrace();
}
}
示例2: testWithInvalidWeight
import org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException; //導入依賴的package包/類
@Test(expected = XmlBeanDefinitionStoreException.class)
public void testWithInvalidWeight() throws Exception {
check("spring/XmlConfigPlaceholderTest5.xml", DEFAULT_TIMEOUT, DEFAULT_BATCH);
}