报错:Invalid bound statement (not found)
找不到mapper.xml文件。
mapper映射有两种方法,同时也对应了两种bug:
在同一包下映射:
![](https://i-blog.csdnimg.cn/blog_migrate/be14d93d4f6b0c5ec1686d58df33e8e2.png)
解决方法:在pom.xml中配置:
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>
**/*.xml
</include>
<include>
**/*.properties
</include>
</includes>
</resource>
</resources>
</build>
xml放在resources文件夹下:
![](https://i-blog.csdnimg.cn/blog_migrate/a9298bc0d37e8fed22eecba1494f0aec.png)
解决方法:
将包名修改与上面mapper.java的一样。