Invalid bound statement(not found):cn.e3mall.mapper.TbItemMapper.selectByExample.....

1、出现如下问题:

 

说明mapper接口和mapper.xml映射文件没有在一个文件夹下面

2、解决方法:

dao层的pom.xml中配置一下:

<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 -->

<project>
<build>

    <resources>

           <resource>

               <directory>src/main/java</directory>

               <includes>

                   <include>**/*.properties</include>

                   <include>**/*.xml</include>

               </includes>

               <filtering>false</filtering>

           </resource>

       </resources>

</build>
</project>

 

posted @ 2018-12-19 19:03  没有名字~  阅读(452)  评论(0编辑  收藏  举报