美文网首页
tk.mybatis.mapper.provider.base.

tk.mybatis.mapper.provider.base.

作者: caopengflying | 来源:发表于2019-03-20 18:03 被阅读0次

    出现这个错误是通用Mapper初始化的错误,排查的方向就是往这个方向,可能的情况有以下几种:

    1. 1.jar包冲突

    2. MapperCan 扫包配置错误
      我的错误就是扫描包错误。我的项目是采用spring-boot,在扫描的时候注解为

    @Configuration
    @ComponentScan(basePackages = {com.example.reposity})
    @EnableTransactionManagement(proxyTargetClass = true)
    public class MyBatisConfiguration{
    

    但是生成的BaseInsertProvider不在这个扫描包下所以失败了。
    将这个改成对应的父类的包,扫描该包下所有的包即可。

    相关文章

      网友评论

          本文标题:tk.mybatis.mapper.provider.base.

          本文链接:https://www.haomeiwen.com/subject/kqvtvqtx.html