nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML.

写完Mapper后,AJ项目运行报错

nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML.

百度翻译:嵌套的异常是org.apache.ibatis.builder.builderException:分析映射器XML时出错。

解决方法:参考https://blog.csdn.net/weixin_39881983/article/details/88324706

尝试解决:

  1:说是mybatis的MapperScan和通用mapper的MapperScan,查看了自己项目的注解,发现application上有@MapperScan,并且dao接口上也有@Mapper,去掉dao接口上的@Mapper;【没解决】

  2:查看自己的mapper.xml文件

    去掉resultMap的JdbcType属性

    cloum中的字段大写

不报错了

自己写的东西要负责的啊。

转载于:https://www.cnblogs.com/LearnSB/p/11347277.html

Error creating bean with name 'courseController': Unsatisfied dependency expressed through field 'courseService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'courseServiceImpl': Unsatisfied dependency expressed through field 'courseMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'courseMapper' defined in file [D:\wnnj_workspace\phase3\coureselection\target\classes\com\wnnj\coureselection\mapper\CourseMapper.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 [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.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 [D:\wnnj_workspace\phase3\coureselection\target\classes\mapper\CourseMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [D:\wnnj_workspace\phase3\coureselection\target\classes\mapper\CourseMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'course'. Cause: java.lang.ClassNotFoundException: Cannot find class: course
07-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值