2 u012898211 u012898211 于 2016.01.15 10:27 提问

我在框架融合的中遇到一些问题!(DWR+EXT+Spring+mybatis )

我的服务器是 WAS的 在服务器上的日志文件中,查看到这样输出。

输出:
[16-1-15 9:53:35:449 CST] 00000070 SystemOut O 2016-01-15 09:53:35,449 [INFO ]: 保存
[16-1-15 9:53:35:449 CST] 00000070 ClassPathXmlA I org.springframework.context.support.AbstractApplicationContext prepareRefresh Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@9e12f51a: startup date [Fri Jan 15 09:53:35 CST 2016]; root of context hierarchy
[16-1-15 9:53:35:449 CST] 00000070 XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from class path resource [config/applicationContext-common.xml]
[16-1-15 9:53:35:450 CST] 00000070 SystemOut O 2016-01-15 09:53:35,450 [INFO ]: 保存设备状态的异常!IOException parsing XML document from class path resource [config/applicationContext-common.xml]; nested exception is java.io.FileNotFoundException: class path resource [config/applicationContext-common.xml] cannot be opened because it does not exist

代码段:

        //优化方式1
        //bean工厂获取 映射文件 (新建一个新session)   ClassPathXmlApplicationContext[只能读取在web-info/classes目录文件配置文件]
        BeanFactory factory = new ClassPathXmlApplicationContext("classpath:config/applicationContext-common.xml");
        //获取到  session工厂
        //factory.getBean("sqlSessionFactoryBean");
        BaseDao_Impl<Map<String, String>> dao = new BaseDao_Impl<Map<String, String>>();
        //设置DAO层的sessionFacotry
        dao.setSqlSessionFactory((SqlSessionFactory) factory.getBean("sqlSessionFactoryBean"));
        BaseBiz_Impl<Map<String, String>> bbi = new BaseBiz_Impl<Map<String, String>>();
        bbi.setDao(dao);

1个回答

devmiao
devmiao   Ds   Rxr 2016.01.19 04:32
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!