mybatis invalid bound statement (not found)

Spring boot + Mybatis : Invalid bound statement (not found)

若是隻在啓動類上配置@MapperScan註解,默認只掃描和mapper接口同名的xml文件
若有mapper接口名字和xml名字不同的狀況,需掃描任意名字的xml須要配置以下spring

#application.properties
mybatis.mapper-locations=classpath*:com/xx/xxx/*.xml

若是你不是這個問題 有使用maven的話,多是編譯的時候xml資源沒有打進來mybatis

enter image description here

相關文章
相關標籤/搜索