Error while adding the mapper ‘interface *****类‘ to configuration报错原因
生活随笔
收集整理的這篇文章主要介紹了
Error while adding the mapper ‘interface *****类‘ to configuration报错原因
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
啟動項目報錯:
Error while adding the mapper ‘interface com.boc.ljh.mapper.UserMapper’ to configuration.
***UserMapper是我自己創建的mapper接口
原因:是因為報錯的類對應的.xml文件錯誤,也就是UserMapper對應的UserMapper.xml文件錯誤導致的。
第一種情況:配置的.xml文件格式錯誤,導致以上報錯。
第二種情況:namespace地址配置錯誤,導致以上報錯。
第三種情況:只創建了.xml文件,里面還沒有寫任何內容,導致以上報錯。
總結
以上是生活随笔為你收集整理的Error while adding the mapper ‘interface *****类‘ to configuration报错原因的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: shiro基于url权限认证时doGet
- 下一篇: Springboot中实现文件上传功能