tomcat启动报错

来源:6-9 用户模块所有功能自测试

weixin_慕用7530111

2020-07-06

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.mmall.service.IUserService com.mmall.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.mmall.dao.UserMapper com.mmall.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userMapper’ defined in file [/Users/kanrei/IdeaProjects/mmall/target/mmall/WEB-INF/classes/com/mmall/dao/UserMapper.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’: : Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed;

代码都是跟着老师的来的,不知道为啥还会报错

写回答

1回答

geelylucky

2020-07-07

同学,检查一下applicationContext-datasource.xml这个配置文件,应该是数据库链接创建失败了。看看用户名密码,driver有没有写对

0
1
weixin_慕用7530111
老师,applicationContext-datasource.xml检查过了,应该没有问题,但还是报了一样的错误...
2020-07-08
共1条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程