MyBatis繫結錯誤:org.apache.ibatis.binding.BindingException:Invalid bound statement (not found)
如果出現org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)錯誤,一般的原因是Mapper interface和xml檔案的定義對應不上,需要檢查包名,namespace,函式名稱等能否對應上,需要比較細緻的對比,按以下步驟一一執行:
1、檢查xml檔案所在的package名稱是否和interface對應的package名稱一一對應
2、檢查xml檔案的namespace是否和xml檔案的package名稱一一對應
3、檢查函式名稱能否對應上
4、去掉xml檔案中的中文註釋
5、隨意在xml檔案中加一個空格或者空行然後儲存
除此之外,還有一些特殊情況:
1、Idea的包名和目錄名生成機制,新建一個包1.2.3,目錄結構不是1—>2—>3,而是生成"1.2.3"的目錄,進而導致mybatis對映錯誤,此錯誤很難排查。
2、xml檔案定義如下:
<select id="*******" parameterMap="java.util.Map" resultType="java.lang.Integer">
parameterMap用錯,應該為parameterType,此錯誤會導致mybatis所有的mapper都報繫結錯誤。
相關文章
- MyBatis 錯誤:Invalid bound statement (not found)MyBatis
- mybatis 報錯: Invalid bound statement (not found)MyBatis
- Invalid bound statement (not found)錯誤解決
- mybatis3:Invalid bound statement (not found)MyBatisS3
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)ApacheBATException
- mybatis配置時出現org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)MyBatisApacheException
- mybatis-plus自定義mapper報org.apache.ibatis.binding.BindingException: Invalid bound statement(not found)MyBatisAPPApacheException
- 【spring boot Mybatis】報錯:org.apache.ibatis.binding.BindingException: Invalid bound statement (not fo...Spring BootMyBatisApacheException
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): yycg.business.dao.mApacheBATException
- MybatisPlus自帶方法報錯BindingException: Invalid bound statement (not found)MyBatisException
- 報錯Invalid bound statement (not found): com.thxy.mapper.RoleMapper.insertRleAPP
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)的問題處理方式之一ApacheBATException
- IDEA+Maven:invalid bound statement (not found)解決辦法IdeaMaven
- 關於org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),找不到mapper檔案問題解決ApacheBATExceptionAPP
- IDEA+Maven+Springboot:invalid bound statement (not found) 解決辦法IdeaMavenSpring Boot
- 解決org.apache.ibatis.binding.BindingException: Invalid boundApacheBATException
- Mybatis中org.apache.ibatis.binding.BindingException錯誤問題總結MyBatisApacheException
- (已解決)確定mapper配置無誤,且配置檔案無誤, 執行無誤 出現org.apache.ibatis.binding.BindingException: Invalid bound statemenAPPApacheBATException
- MyBatis介面繫結原理MyBatis
- All About JAVA An invalid XML character (Unicode: 0xdd65) was found in the comment 錯誤JavaXMLUnicode
- std::sort 錯誤"Expression : invalid operator <"Express
- 小程式錯誤:Component is not found in path
- WebSphere Adapter 客戶定製的錯誤繫結WebAPT
- 執行news例子說ejb沒有繫結錯誤
- 執行mysqlbinlog出現Found invalid event in binary log錯MySql
- DBCA建庫出現CHMOD NOT FOUND錯誤
- Python 錯誤 SyntaxError: invalid character in identifierPythonErrorIDE
- Checkpoint log:invalid bitmap page錯誤修復
- ORA-600(kkoipt:invalid join method)錯誤
- mybatis引數型別錯誤MyBatis型別
- React 中 呼叫 lodash.debounce 不錯誤繫結 this 解決方案React
- Eclipse 啟動專案錯誤:class not foundEclipse
- 解決ntp的錯誤 no server suitable for synchronization foundServerUI
- vue2.0 練習中報錯問題處理(資料繫結錯誤)Vue
- 解決SpringMVC+Hibernate錯誤: No Hibernate Session bound to threadSpringMVCSessionthread
- Sublime修復錯誤【xcrun: error: invalid active developer path… 】ErrorDeveloper
- 解決shell指令碼錯誤$’r’ command not found指令碼
- shell指令碼執行錯誤 $‘\r‘:command not found指令碼