码迷,mamicode.com
首页 > 移动开发 > 详细

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.coder520.mamabike.user.dao.UserMapper.selectByPrimaryKey

时间:2017-12-14 04:23:53      阅读:345      评论:0      收藏:0      [点我收藏+]

标签:dea   ima   iba   cto   false   log   apach   mapper   directory   

这个异常是IDEA中漏加载mapper.xml文件,在classes中没找到,所以要在配置文件中加入:

!--如果不添加此节点mybatis的mapper.xml文件都会被漏掉。-->
  <build>
   <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.properties</include>
          <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.properties</include>
          <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
      </resource>
    </resources>
  </build>

 

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.coder520.mamabike.user.dao.UserMapper.selectByPrimaryKey

标签:dea   ima   iba   cto   false   log   apach   mapper   directory   

原文地址:http://www.cnblogs.com/huangjuncong/p/8035009.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!