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都報繫結錯誤。
相關文章
- 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
- 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
- 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
- found an invalid color
- std::sort 錯誤"Expression : invalid operator <"Express
- Python 錯誤 SyntaxError: invalid character in identifierPythonErrorIDE
- MyBatis介面繫結原理MyBatis
- 小程式錯誤:Component is not found in path
- Checkpoint log:invalid bitmap page錯誤修復
- org.apache.ibatis.binding.BindingException: Parameter 'xxx' not found.ApacheBATException
- Eclipse 啟動專案錯誤:class not foundEclipse
- mybatis配置執行報出Caused by: org.apache.ibatis.binding.BindingException:相關錯誤解決或者空指標異常MyBatisApacheException指標
- Python錯誤集錦:for x in range(5) ^ SyntaxError: invalid syntaxPythonError
- React 中 呼叫 lodash.debounce 不錯誤繫結 this 解決方案React
- mybatis引數型別錯誤MyBatis型別
- shell指令碼執行錯誤 $‘\r‘:command not found指令碼
- 解決shell指令碼錯誤$’r’ command not found指令碼
- 解決 The ‘supervisor==3.2.0‘ distribution was not found and is required by the application錯誤UIAPP
- 13.MyBatis報錯:Error querying database. Cause: org.apache.ibatis.binding.BindingException: ParameterMyBatisErrorDatabaseApacheException
- zblog新增html後臺出錯,zblog後臺設定固定域名繫結錯誤HTML
- 安卓簽名檔案打包錯誤 Invalid keystore format安卓ORM
- Caused by: org.apache.ibatis.binding.BindingException: Parameter 'parameter' not found.解決ApacheBATException
- mybatis竟然報"Invalid value for getInt()"MyBatis
- nacos2.3.0版本403 user not found錯誤
- PyTorch出現錯誤“RuntimeError: Found dtype Double but expected Float”PyTorchError
- 有遇到過 Invalid opcode 34/16/8.的錯誤嗎
- ORA-00904: "wm_concat":invalid identifier錯誤如何解決?IDE
- Swoole 使用on()繫結事件報錯事件
- jsp錯誤: "javax.servlet.http.HttpServlet" was not found on the Java Build PathJSJavaServletHTTPUI