nested exception is org.apache.ibatis.binding.BindingException: Parameter 'deptId' not found. Available parameters are [qo, param1]
时间: 2023-09-25 22:17:13 浏览: 190
nested exception is org.apache.ibatis.binding.BindingException: Parameter 'deptId' not found. Available parameters are [qo, param1] 这个异常是MyBatis框架抛出的异常,表示在SQL语句中找不到名为'deptId'的参数。可用的参数是[qo, param1]。
这个问题通常发生在使用MyBatis开发时,当传入多个参数时,框架无法正确识别参数的名称,导致查询失败。解决这个问题的方法是确保参数名称和SQL语句中的占位符名称一致。可以使用@Param注解明确指定参数的名称,或者使用Map或对象来传递参数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘id‘ not found....](https://blog.csdn.net/m0_61916154/article/details/130360608)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘status‘ not found.](https://blog.csdn.net/m0_53572054/article/details/131913662)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文