错误的原因:mybatis中dao接口与mapper配置文件在做映射绑定的时候出现问题,简单说,就是接口与xml要么是找不到,要么是找到了却匹配不到。

mapper接口开发规范

  • 1、Mapper.xml文件中的namespace与mapper接口的类路径相同。

  • 2、Mapper接口方法名和Mapper.xml中定义的每个statement的id相同(下图中选中的内容要一样)

  • 3、Mapper接口方法的输入参数类型和mapper.xml中定义的每个sql 的parameterType的类型相同

  • 4、Mapper接口方法的输出参数类型和mapper.xml中定义的每个sql的resultType的类型相同

我报的错老牛逼了。
建包的路径出现了问题。

修改后(还是老老实实这样按路径相同的写、别来那么多骚操作)

之前的这种路径不同的骚操作也是可以的。

Invalid bound statement (not found): com.zheng.mapper.UserMapper.login的更多相关文章

  1. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.shen.mapper.UserMapper.findById

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.shen.mapper.Use ...

  2. 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 ...

  3. IDEA报错: Invalid bound statement (not found): com.test.mapper.UserMapper.selectByPrimaryKey(转发:https://www.cnblogs.com/woshimrf/p/5138726.html)

    学习mybatis的过程中,测试mapper自动代理的时候一直出错,在eclipse中可以正常运行,而同样的代码在idea中却无法成功.虽然可以继续调试,但心里总是纠结原因.百度了好久,终于找到一个合 ...

  4. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.bw.mapper.BillMapper.getBillList at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:225

    这个错误是没有找到映射文件 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.b ...

  5. [转载]Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample: 错误

    因碰到同样的问题,使用该方法对我有效,为方便以后查找,所以做了转载,原文请查看:https://www.cnblogs.com/fifiyong/p/5795365.html 在Maven工程下,想通 ...

  6. Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample: 错误

    在Maven工程下,想通过controller接收url中的参数Id查询数据库的数据,并且以json形式显示在页面. 在浏览器输入url后出现的问题: 八月 22, 2016 1:45:22 下午 o ...

  7. Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample问题解决

    最近在做一个关于ssm框架整合的项目,但是今天正合完后出现了问题: Invalid bound statement (not found): com.taotao.mapper.TbItemMappe ...

  8. Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByPrimaryKey

    Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByPrimaryKey Invalid bound ...

  9. 项目启动报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.wuhongyu.mapper.OrdersMapper.selectByExample

    在用maven配置mybatis环境时出现此BindingExceptiony异常,发现在classes文件下没有mapper配置文件,应该是maven项目没有扫描到mapper包下的xml文件, 在 ...

随机推荐

  1. 基于LadybugFlow的微服务编排(1.SpringBoot集成)

    前言 前面的系列文章里,介绍了ladybugflow的业务可视化的设计以及常见场景的使用方法. 感谢大家对项目的关注. 本篇文章介绍一下基于ladybugflow的微服务编排场景及使用方法. 1. 业 ...

  2. MySQL 数据查询语句

    一般查询 字段取别名 别名不用加单引号,as 可省略. select t.id ID, t.name 名称 from grade t; 拼接字符串 concat(a, b) select concat ...

  3. 论文解读(PairNorm)《PairNorm: Tackling Oversmoothing in GNNs》

    论文信息 论文标题:PairNorm: Tackling Oversmoothing in GNNs论文作者:Lingxiao Zhao, Leman Akoglu论文来源:2020,ICLR论文地址 ...

  4. 2022-08-15 - 初识MySQL

    MySQL数据库 数据库 数据库,又称为Database,简称DB.数据库就是一个文件集合. 顾名思义:是一个存储数据的仓库,实际上就是一堆文件,这些文件中存储了具有特定格式的数据,可以很方便的对里面 ...

  5. 1.6_HTML基础属性

    name 属性 name 属性用于指定标签元素的名称. <a> 标签内必须提供 href 或 name 属性. <a name="value"> id 属性 ...

  6. 【HTML】学习路径5-预格式标签和字体标签

    <!DOCTYPE html> <html> <head> <title>我是标题</title> <meta charset=&qu ...

  7. python自学笔记10:while循环和for循环

    条件控制和循环控制是两种典型的流程控制方法,前面我们写了 if 条件控制,这节讲 for 循环和 while 循环. 循环是另一种控制流程的方式,一个循环体中的代码在程序中只需要编写一次,但可能会连续 ...

  8. KingbaseES V8R3集群运维案例之---用户自定义表空间管理

    ​案例说明: KingbaseES 数据库支持用户自定义表空间的创建,并建议表空间的文件存储路径配置到数据库的data目录之外.本案例复现了,当用户自定义表空间存储路径配置到data下时,出现的故障问 ...

  9. bfile 类型数据的存取

    KingbaseES 支持 bfile 数据类型.对于bfile ,实际数据是存储在操作系统上,数据库存储的只是指向文件的指针. 具体例子如下: test=# create directory BFI ...

  10. Nginx超时问题解决

    在 nginx.conf 中配置以下内容 ... http { ... server { # 这里表示upstream 的连接.读取.发送超时时间都是300秒 proxy_connect_timeou ...