【踩坑】遇到 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),部 ...
随机推荐
- shell script-条件语句、循环语句
条件语句 #!/bin/bash read -p "input your name:" name #第一种判断 if [ "$name" == "Mi ...
- 7、RNAseq Downstream Analysis
Created by Dennis C Wylie, last modified on Jun 29, 2015 Machine learning methods (including cluster ...
- linux中制作动态库
制作一个动态库我们可以使用gcc工具来制作一个动态库示例:自己制作一个动态库,库函数的功能是传递一个字符串并输出.第一步:需要准备3个文件:hello.h.hello.c.test.c.其中hello ...
- charles解决相应乱码问题
Charles.ini 文件手动添加vmarg.5=-Dfile.encoding=UTF-8
- Firefox 网页 光标 闪烁
最近 Firefox 出现怪异情况:鼠标点击网页,在点击的位置显示光标,并一直闪烁,导致 Home End 等按键都无效. 原来这是 Firefox 的 “特色功能”:Caret Browsing,激 ...
- 1.jQuery入口函数 与javaScript入口函数
1.jQuery入口函数 与javaScript入口函数 JQ入口函数: $(document).ready(function(){ }); 或者 $(function(){ }) Js入口函数: w ...
- asp.net Page.Controls对象(找到所有服务器控件)
前台 复制代码 代码如下: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="De ...
- OpenStack虚机状态变化图解
对官网上内容的一个翻译,方便自己以后查找资料用 The following diagrams and tables show the required virtual machine (VM) sta ...
- js对象转换为json字符串
JavaScript的对象是一组由键-值组成的无序集合,例如: var person = { name: 'Bob', age: 20, tags: ['js', 'web', 'mobile'], ...
- vue -- 异常处理集合
1.npm run dev 运行出错,报错如下: > webpack-dev-server --inline --progress --config build/webpack.dev.conf ...