_潜伏者_
2016-01-15 02:27
采纳率: 66.7%
浏览 1.3k

我在框架融合的中遇到一些问题!(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 2016-01-18 20:32
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题