1. 程式人生 > >關於 “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 錯誤的問題。

關於 “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 錯誤的問題。

springboot整合mybatis,出現 “org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)” 錯誤原因:

1、dao層mapper介面有沒有@Mapper註解,或者啟動類有沒有@MapperScan()註解,Spring無法進行管理。兩個註解選擇一種方式使用即可


2、Spring沒有讀取到mapper配置檔案,application.properties中是否進行了配置


2、整合mybatis無mapper檔案的方案,Mapper介面中,各個方法要新增sql註解