web初始化出现的问题
来源:6-9 用户模块所有功能自测试
搁浅的珊瑚海
2018-03-04
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManageController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.hzq.service.IUserService com.hzq.controller.backend.UserManageController.iUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iUserService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.hzq.dao.UserMapper com.hzq.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [D:\idea\demo\target\demo\WEB-INF\classes\com\hzq\dao\UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory
2回答
-
ava.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory'
你好,同学,根本异常是因为这个,看看是否导错包?或者jar包没配置上?检查一下pom文件,和课程对比一下。
00 -
polo哦
2018-03-05
你好同学~根据错误主要是userMapper出错了~你可以看看有没有写错里面的一点东西,或者配置文件扫描mapper文件失败~
00
相似问题