模擬登錄操作
$.post("/admin/login", {aname, pwd }, rt => {
if (rt.code == 200) {
location.href = "manager/index.html";
return;
}
alert(rt.msg)
});
網(wǎng)頁(yè)提示服務(wù)器代碼錯(cuò)誤
POST http://localhost:8888/admin/login 500
后端顯示無(wú)法找到Mapper中對(duì)應(yīng)的方法
threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.peng.mapper.AdminifoMapper.login] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.peng.mapper.AdminifoMapper.login
原因
相信我們?cè)趯W(xué)習(xí)Mybatis的時(shí)候都出現(xiàn)過(guò) Invalid bound statement (not found)
這個(gè)錯(cuò)誤,
一般由以下幾種可能導(dǎo)致這個(gè)錯(cuò)誤
-
第一種:mapper.xml中的namespace和實(shí)際的mapper文件不一致
-
第二種:mapper.xml中的id名與mapper接口中的方法名不一致
插件 MyBatisX
https://blog.csdn.net/zykwblx/article/details/125425421文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-633527.html
https://blog.csdn.net/weixin_46019348/article/details/124854909文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-633527.html
到了這里,關(guān)于Mybatis異常Invalid bound statement (not found)原因之Mapper文件配置不匹配的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!