javaEE applicationContext.xml 放到WEB-INF下 class获得bean方法
2012-07-17 17:18
441 查看
Resource resource = new ClassPathResource("../applicationContext.xml");
BeanFactory factory = new XmlBeanFactory(resource);
BeanFactory factory = new XmlBeanFactory(resource);
相关文章推荐
- [/WEB-INF/applicationContext-dao.xml]; nested exception is java.lang.ClassCastException
- 【JAVA错误笔记】 - 【Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法】
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- 加载/WEB-INF/applicationContext.xml的解决方法
- 【转】Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- spring读取applicationContext.xml获得BeanFactory的方法
- Could not open ServletContext resource [/WEB-INF/classes/applicationContext.xml]解决方法
- IOException parsing XML document from class path resource [WebRoot/WEB-INF/applicationContext.xml];
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- java中读取配置文件的方法fileSystemXmlapplicationContext与classPathXmlApplicationContext
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Java 读取ClassPathXmlApplicationContext xml 文件里面的bean
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- dorado7 Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Spring ClassPathXmlApplicationContext getBean创建实例
- Spring IOC 源码-ClassPathXmlApplicationContext-bean解析