在一切准備就緒之后,測試test,卻出現了org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
這個問題,通常情況下,這是xml文件與接口mapper不對應導致的. 但我仔細檢查了一遍,沒有發現錯誤.
在查閱過相關資料后發現,IDEA對xml文件處理的方式不同. mapper.xml文件需要放置在resource這個文件夾下.
而eclipse只要mapper接口文件與mapper.xml放置在同一平級目錄就行