高分spring 中 ClassPathXmlApplicationContext问题
我把applicationContex.xml放在WEB-INF下面,用ClassPathXmlApplicationContext (
"/applicationContext-common-business.xml");
ClassPathXmlApplicationContext (
"/WEB-INF/applicationContext-common-business.xml");
ClassPathXmlApplicationContext (
"applicationContext-common-business.xml");
都老是说找不到文件,怎么办.是不是要设置什么
错误如下:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-common-business.xml,/applicationContext-portal.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-common-business.xml,/applicationContext-portal.xml] cannot be opened because it does not exist
java.io.FileNotFoundException: class path resource [applicationContext-common-business.xml,/applicationContext-portal.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:127)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:144)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:99)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:102)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:70)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:87)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:264)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:56)
at com.guanghua.AppContext.<init>(AppContext.java:31)
at com.guanghua.AppContext.getInstance(AppContext.java:25)