当我们使用maven项目管理时候,我们的运行项目报了一个Invalid bound statement (not found):xxxx.selectByExample
原因是:默认只拷贝resources下面的配置文件
解决办法 在mapper那一层的pom.xml文件中添加以下代码
<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 -->
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>