运行出错

来源:8-9 商品管理模块所有功能自测

咖啡爱上茶

2018-04-30

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.eduhelper.service.IUserService com.eduhelper.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.eduhelper.dao.UserMapper com.eduhelper.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [F:\apache-tomcat-7.0.75\webapps\ROOT\WEB-INF\classes\com\eduhelper\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; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [F:\apache-tomcat-7.0.75\webapps\ROOT\WEB-INF\classes\mappers\ScoreMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.lang.String '.  Cause: java.lang.ClassNotFoundException: Cannot find class: java.lang.String ; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [F:\apache-tomcat-7.0.75\webapps\ROOT\WEB-INF\classes\mappers\ScoreMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.lang.String '.  Cause: java.lang.ClassNotFoundException: Cannot find class: java.lang.String 

写回答

2回答

Geely

2018-05-01

Could not autowire field: private com.eduhelper.dao.UserMapper com.eduhelper.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [F:\apache-tomcat-7.0.75\webapps\ROOT\WEB-INF\classes\com\eduhelper\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; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [F:\apache-tomcat-7.0.75\webapps\ROOT\WEB-INF\classes\mappers\ScoreMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.lang.String '. 


你好同学,的确眼睛花啦,但是我找到了关键异常~~~同学检查一下 ScoreMapper.xml 里面

0
3
Geely
回复
咖啡爱上茶
嗯可以滴~完全没有问题。
2018-05-01
共3条回复

星辰Iron

2018-04-30

你好同学,能不能把错误信息填到代码框里面,眼睛快看瞎了!

0
1
咖啡爱上茶
恩恩下次注意,谢谢!
2018-05-01
共1条回复

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

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

9504 学习 · 8820 问题

查看课程