mybatis-plus绑定属性出错解决方案org.apache.ibatis.binding.BindingException:Invalid bound statement(not found)

mybatis-plus绑定属性出错解决方法

  • 问题1 配置文件
    • 问题2 pom文件
    • 兼容问题

问题1 配置文件

查看yml配置文件 这里是否扫描到xml配置
看这里是否扫描到xml配置
mybatis-plus绑定属性出错解决方案org.apache.ibatis.binding.BindingException:Invalid bound statement(not found)_第1张图片
配置config这里也需要扫描 注意这里的路径一定要正确

问题2 pom文件

 
            com.baomidou
            mybatisplus-spring-boot-starter
            1.0.5
        
      
          com.baomidou
           mybatis-plus
            2.1.9
        

注意:mybatis-plus-spring-start/或者我上面的这个(第一个)如果你使用的是mybatis-plus(第二个包)这个
配置文件请使用

mybatis-plus:
  mapper-locations: xxxxx

mybatis-plus-spring-start这种

mybatis:
  mapper-locations: xxxxx

这里一个用的mybatis 一个mybatis-plus去扫描 如果用我的pom请使用mybatis-plus这个配置
同时这个问题可以解决(本人亲测 --把pom改回来还是报错因为缓存还是pom没下载过来 删了好几次才好)

兼容问题

以上排除配置问题 来个最暴力的解决

        
            com.baomidou
            mybatis-plus-boot-starter
            3.0.7
        
        
            com.baomidou
            mybatis-plus
            3.0.7
        
        
            com.baomidou
            mybatis-plus-generator
            3.0.7
        
        
        
            com.github.pagehelper
            pagehelper-spring-boot-starter
            1.2.13
        

这样问题就完美解决了 但是前面的扫描配置不要弄错了

有的pom直接项目不能启动的用我这个配置应该可以解决

你可能感兴趣的:(mybatis-plus绑定属性出错解决方案org.apache.ibatis.binding.BindingException:Invalid bound statement(not found))