搭建idea出现无法自动映射Mapper问题

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

如出这种问题,导致的原因是mapp.xml没有放在资源文件中,在编译的时候 iida不会酱 诸如.xml文件编译到classes下面,应该要告诉IDE 酱mapp.xml文件编译到classes文件中。请在pom.xm 的<build>中加入如下代码:

<resources>
<resource>
<directory>src/main/Java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.* </include>
</includes>
</resource>
</resources>

posted @ 2019-05-09 10:46  青春岁月,无怨无悔  阅读(1214)  评论(0编辑  收藏  举报