欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

MyBatis綁定錯(cuò)誤提示BindingException:Invalid bound statement (not found)的解決方法

 更新時(shí)間:2017年01月24日 16:33:30   作者:luo奔的蝸牛  
這篇文章主要介紹了MyBatis綁定錯(cuò)誤提示BindingException:Invalid bound statement (not found)的解決辦法,非常不錯(cuò),具有參考借鑒價(jià)值,需要的的朋友參考下吧

如果出現(xiàn):

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

一般的原因是Mapper interface和xml文件的定義對(duì)應(yīng)不上,需要檢查包名,namespace,函數(shù)名稱等能否對(duì)應(yīng)上。

按以下步驟一一執(zhí)行:

1、檢查xml文件所在的package名稱是否和interface對(duì)應(yīng)的package名稱一一對(duì)應(yīng)

2、檢查xml文件的namespace是否和xml文件的package名稱一一對(duì)應(yīng)

3、檢查函數(shù)名稱能否對(duì)應(yīng)上

4、去掉xml文件中的中文注釋

5、隨意在xml文件中加一個(gè)空格或者空行然后保存

注意:在使用IDEA開(kāi)發(fā)時(shí),如果打包時(shí)*Mapper.xml沒(méi)有自動(dòng)復(fù)制到class輸出目錄的mapper類包下,則需要在pom文件中添加mybatis加載配置文件的配置!

如下:

<build>
  <resources>
    <resource>
        <directory>src/main/java</directory>
      <includes>
        <include>**/*.xml</include>
      </includes>
    </resource>
    <resource>
      <directory>src/main/resources</directory>
    </resource>
  </resources>
</build>

以上所述是小編給大家介紹的MyBatis綁定錯(cuò)誤提示BindingException:Invalid bound statement (not found)的解決方法,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論