maven +ssm整合创建bean异常的问题

yc_learn 2017-07-26 03:15:03

controller 已经被实例化,但是在创建controller bean时却抛一堆异常
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'usersController': Unsatisfied dependency expressed through field 'usersService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usersService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IUsersDao' defined in file [F:\test\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\studentms\WEB-INF\classes\com\kingsoft\studentms\dao\IUsersDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [F:\test\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\studentms\WEB-INF\classes\com\kingsoft\studentms\mapping\ComJobMapper.xml]';
...全文
204 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
strong_mz 2017-07-26
  • 打赏
  • 举报
回复
看一下你的这个文件ComJobMapper.xml,这个文件中有问题

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧