使用mapper報錯BindingException

在調用mapper方法的時候,報錯:
ache.ibatis.binding.BindingException: Type interface dynamicDao.dao.UserDao is not known to the MapperRegistry.
解決該錯誤:
出現該錯誤是因爲你在xml所定義的mapper接口路徑和實際中寫的不一致,比如說你是當前包下的mapper,然而在對應的mapper.xml裏面,nameSapce寫的路徑不對,所以纔沒找到。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章