模拟登录操作
$.post("/admin/login", {aname, pwd }, rt => {
if (rt.code == 200) {
location.href = "manager/index.html";
return;
}
alert(rt.msg)
});
网页提示服务器代码错误
POST http://localhost:8888/admin/login 500
后端显示无法找到Mapper中对应的方法
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
原因
相信我们在学习Mybatis的时候都出现过 Invalid bound statement (not found)
这个错误,
一般由以下几种可能导致这个错误
-
第一种:mapper.xml中的namespace和实际的mapper文件不一致
-
第二种:mapper.xml中的id名与mapper接口中的方法名不一致
插件 MyBatisX
https://blog.csdn.net/zykwblx/article/details/125425421
https://blog.csdn.net/weixin_46019348/article/details/124854909