【踩坑】遇到 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 报错
今天在重做 iblog 客户端时,测试接口情况,发现了
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)::iblog.server_java.dao.AuthorDao.selectForLogin
的报错。经过排查,基本定位为 AuthorMapper.xml 文件中的问题。但是检查 namespace 属性的Dao路径又没发现什么问题。
上网搜索了一阵,答案全部都是让检查路径或者文件名有没有错,可是都没发现问题。
后来回想写 Mapper 文件时,时复制粘贴 iReview 项目的,对比了它们的路径,也没发现问题,难道就无解了?
<mapper namespace="main.java.iReview.dao.UsersDao">
<mapper namespace="main.java.iblog.server_java.dao.AuthorDao">
后来,经过仔细对比,前后两个项目的不同之处在于项目路径,iReview 是在 main.java.main.java 下,而 iblog 是在 main.java 之下。
猜测 Mapper 文件 namespace 属性的路径是不用带默认的 main.java ,于是把它删了,再测试,果然没问题了。
<mapper namespace="iblog.server_java.dao.AuthorDao">
又涨知识了^_^
【踩坑】遇到 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 报错的更多相关文章
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)报错
0 环境 系统环境:win10 1 正文 先检查Mapper接口与相关联xml文件是否对应,需要检查包名,namespace位置是否写对,curd时id名称等能否对应上 常规步骤: :检查mapper ...
- IDEA+Maven+Mybatis 巨坑:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.rao.mapper.UserMapper.findAll
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.rao.mapper.User ...
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): da.huying.usermanag ...
- Exception:HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
主要错误信息如下: HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...
- mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误
最近在使用mybatis时,出现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 这 ...
- IDEA异常解决: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
有时候解决问题不仅仅是解决问题.-----jstarseven 最近因为开发需要,需要搭建一个ssm开发框架,采用了开发工具IDEA. 整合完了SSM开发框架之后,发布的时候出现org.apache. ...
- 通过maven test 报org.apache.ibatis.binding.BindingException: Invalid bound statement
背景 直接使用eclipse工具去执行,没有问题,通过testng.xml去执行,没有问题,但通过mvn clean test执行,就报错,提示org.apache.ibatis.binding.Bi ...
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.e3mall.search.mapper.ItemMapper.getItemList
java.lang.RuntimeException: org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...
- Java学习-052-(mybatis+mysql)访问接口时提示:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
在配置mybatis,访问接口提示: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),部 ...
随机推荐
- fdisk查看硬盘分区表
fdisk [选项] <磁盘> 更改分区表 fdisk [选项] -l <磁盘> 列出分区表 fdisk -s <分区> 给出分区大小(块数) ...
- mongodb 修改操作
$addToSet与$each结合完成批量数组更新 db.text.update({_id:1000},{$addToSet:{books:{$each:["js","d ...
- linux 环境变量恢复默认值
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin 在linux命令下如何访问一个ur ...
- 第一个Python工程
创建你的第一个Python程序 如果你曾经很熟悉visual studio的工作方式.可能对python不习惯. 工程通常只与你使用的IDLE有关系.这些工具习惯将文档,编译,测试集成一体.所以就存在 ...
- jquery筛选元素函数
jquery筛选元素函数 1.过滤匹配第二个p元素: $("button").click(function(){ $("p").eq(1).css(" ...
- KONG 安装 (在 CentOS 7 中)
1. 下载安装包: https://bintray.com/kong/kong-community-edition-rpm/download_file?file_path=centos/7/kong ...
- poj3694(lca + tarjan求桥模板)
题目链接: http://poj.org/problem?id=3694 题意: 给出一个 n 个节点 m 条边的图, 然后有 q 组形如 x, y 的询问, 在前面的基础上连接边 x, y, 输出当 ...
- bzoj3876: [Ahoi2014&Jsoi2014]支线剧情(上下界费用流)
传送门 一道题让我又要学可行流又要学zkw费用流…… 考虑一下,原题可以转化为一个有向图,每次走一条路径,把每一条边都至少覆盖一次,求最小代价 因为一条边每走过一次,就要付出一次代价 那不就是费用流了 ...
- Activity有四种加载模式:standard(默认), singleTop, singleTask和 singleInstance
standard:Activity的默认加载方法,即使某个Activity在Task栈中已经存在,另一个activity通过Intent跳转到该activity,同样会新创建一个实例压入栈中.例如:现 ...
- github上虽然已经有实现好的Char RNN
前言 学习RNN的时候很多人应该都有看过Andrej Karpathy写的The Unreasonable Effectiveness of Recurrent Neural Networks,使用基 ...