spring boot 整合mybatis:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found

Posted echo33

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring boot 整合mybatis:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found相关的知识,希望对你有一定的参考价值。

最近在学习SpringBoot,遇到些异常情况:

1、异常信息

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.hippo.demo.dao.Chapter6DemoMapper.insert

技术分享图片

2、解决方案

问题找了很久,发现使用@Select、@Insert、@Update、@Delete注解代替xxxMapper.xml里面的内容,不存在异常,那就是扫描xxxMapper.xml文件的问题了,查询application.properties配置文件中发现

mybatis.mapper-locations的配置路径除了问题,如图:

技术分享图片

 

修改路径后: mybatis.mapper-locations=classpath:com/hippo/demo/dao/*.xml,问题得到解决。



 




以上是关于spring boot 整合mybatis:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found的主要内容,如果未能解决你的问题,请参考以下文章

spring boot 与 Mybatis整合(*)

spring boot整合mybatis

Spring Boot-整合MyBatis

[web] spring boot 整合MyBatis

spring-boot+mybatis整合简写

Spring boot 学习笔记 - 整合MyBatis