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