mybatis-plus自定義mapper報org.apache.ibatis.binding.BindingException: Invalid bound statement(not found)
今天在springboot的專案中,需要用到自定義的mapper,之前一直使用mybatis-plus自動生成的mapper,一直可以正常使用,今天因為需求需要,自定義了mapper,但是一直報這個錯:
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
似乎找了全網,試了各種辦法,都沒有解決,花了大半天,依然無果,只好乖乖debug進去mybatis-plus的orm的邏輯中,忽然發現是可以正確拿到dao上面定義的介面和方法,但是就是拿不到xml的配置資料
直覺告訴自己,應該是這裡的問題。
在springboot 的入口裡面只是使用註解:
@MapperScan(basePackages = {"xxx.xxx.**.dao"})
只是掃描了dao但是沒有掃描和載入xml資源
因此在property檔案中,配置mybatis-plus的mapper.xml檔案的目錄:
mybatis-plus.mapper-locations=classpath*:/mybatis/mappers/**.xml
就這樣,重啟了之後,竟然解決問題了,看來,有時間還是要好好研究下mybatis-plus裡面的原理。
相關文章
- mybatis 報錯: Invalid bound statement (not found)MyBatis
- 報錯Invalid bound statement (not found): com.thxy.mapper.RoleMapper.insertRleAPP
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)ApacheBATException
- mybatis3:Invalid bound statement (not found)MyBatisS3
- MyBatis 錯誤:Invalid bound statement (not found)MyBatis
- Invalid bound statement (not found)錯誤解決
- 關於org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),找不到mapper檔案問題解決ApacheBATExceptionAPP
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): yycg.business.dao.mApacheBATException
- MyBatis繫結錯誤:org.apache.ibatis.binding.BindingException:Invalid bound statement (not found)MyBatisApacheException
- mybatis配置時出現org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)MyBatisApacheException
- MybatisPlus自帶方法報錯BindingException: Invalid bound statement (not found)MyBatisException
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)的問題處理方式之一ApacheBATException
- IDEA+Maven:invalid bound statement (not found)解決辦法IdeaMaven
- 【spring boot Mybatis】報錯:org.apache.ibatis.binding.BindingException: Invalid bound statement (not fo...Spring BootMyBatisApacheException
- IDEA+Maven+Springboot:invalid bound statement (not found) 解決辦法IdeaMavenSpring Boot
- 解決org.apache.ibatis.binding.BindingException: Invalid boundApacheBATException
- MyBatis-Plus Generator自定義模板MyBatis
- (已解決)確定mapper配置無誤,且配置檔案無誤, 執行無誤 出現org.apache.ibatis.binding.BindingException: Invalid bound statemenAPPApacheBATException
- Mybatis-plus核心功能-自定義SQLMyBatisSQL
- Mybatis-plus排除自定義欄位不查詢MyBatis
- Mybatis-Plus如何自定義SQL隱碼攻擊器?MyBatisSQL
- 自定義Mybatis-plus外掛(限制最大查詢數量)MyBatis
- vue 自定義報警元件Vue元件
- 如何讓Spring MVC顯示自定義的404 Not Found頁面SpringMVC
- 微信公眾號 報 An invalid XML character (Unicode: 0x1a) was found in the CDATA sectioXMLUnicode
- org.apache.ibatis.binding.BindingException: Parameter 'xxx' not found.ApacheBATException
- An invalid XML character (Unicode: 0x18) was foundXMLUnicode
- Caused by: org.apache.ibatis.binding.BindingException: Parameter 'parameter' not found.解決ApacheBATException
- unity GPU bound or CPU boundUnityGPU
- mybatis-plus原始碼解析(三)----Mapper介面動態代理呼叫過程MyBatis原始碼APP
- 皕傑報表之自定義函式函式
- log-bin自定義路徑報錯
- Devexpress 報表 自定義紙張大小devExpress
- 自定義View:自定義屬性(自定義按鈕實現)View
- 如何快速開發靈活自定義報表
- C++ lower_bound upper_boundC++
- Spring Boot入門系列(十七)整合Mybatis,建立自定義mapper 實現多表關聯查詢!Spring BootMyBatisAPP
- IDEA本地執行hadoop程式成功,叢集執行找不到自定義的Mapper類IdeaHadoopAPP