zoukankan      html  css  js  c++  java
  • springboot启动报错

    springboot启动报错信息

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [E:workspaceidea源代码商城项目mall_review_0 argetclassescomomall_reviewmodeldaoUserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:workspaceidea源代码商城项目mall_review_0 argetclassesmappersCartMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:workspaceidea源代码商城项目mall_review_0 argetclassesmappersCartMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'me.zhangbo.mall.model.pojo.Cart'. Cause: java.lang.ClassNotFoundException: Cannot find class: me.zhangbo.mall.model.pojo.Cart

    问题解决

    前后一共两次遇到相似的报错:
    1.mapper.xml中同一个功能的sql写了两遍,重复
    2.mapper.xml中sql的parameterType写成了→me.zhangbo.mall.model.pojo.Cart,所以出现上面的提示信息
    问题主要都是出现在mapper文件中,可以使用mybatis-generator重新生成

  • 相关阅读:
    innodb_fast_shutdown中值为1或者2的区别是?
    C语言解析日志,存储数据到伯克利DB 2
    (2010-8-31) awk内存泄漏以及缓慢的正则表达式计算速度
    C语言解析日志,存储数据到伯克利DB
    awk的接口实现方案1
    谷歌开源Gumbo:纯C语言实现的HTML5解析库
    pylint
    提高写代码的能力(转载)
    python的闭包以及闭包在设计里的意图和作用
    痛并快乐的造轮子之旅:awk访问数据库之旅
  • 原文地址:https://www.cnblogs.com/little-mao2020/p/14781357.html
Copyright © 2011-2022 走看看