这个错误无非就是无效绑定语句,就是找不到这个xml语句。
这里推荐下载一个插件:
有了这个插件就可以很明确的看到你是否绑定正确。
而出现这个**Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)😗*问题:
-
namespace的路径错误。
-
mapper的id和类型错误
这些都可以根据之前说的那个鸟头来判断。。
-
这个也是最恶心的一个问题,就是看target目录下是否有mapper.xml文件,没有的话说明:
-
第一种方法是在pom中添加:
<!-- 项目打包时会将java目录中的*.xml文件也进行打包 --> <build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> </build>
-
第二种方法是暴力法,直接把他给复制一份然后扔在target中(这里推荐第一种。。。)
-