错误的原因: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. 使用 Vagrant 在 VirtualBox 安装 Linux 虚拟机

    GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. 目录 1. 导入 2.工具介绍 3.通过Vagrant为VirtualBox安装CentOS 7 4.总结 文章推荐: 关 ...

  2. MySQL 常见索引类型介绍

    GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. MySQL 主要索引类型有如下几种: 1.主键索引 2.唯一索引 3.普通索引 4.空间索引 5.全文索引 假设有如下一张 ...

  3. 4. 利用MySQL Shell安装部署MGR集群 | 深入浅出MGR

    GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. 目录 1. 安装准备 2. 利用MySQL Shell构建MGR集群 3. MySQL Shell接管现存的MGR集群 4 ...

  4. LINUX下基于NVIDIA HPC SDK 的 VASP6.3.x编译安装报错整理

    关于gcc 用旧版本安装NVIDIA HPC SDK再编译会报错: "/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/move.h" ...

  5. 五,手写SpringMVC框架,过滤器的使用

    8. 过滤器 8.1 编写字符过滤器 CharacterEncodingFilter 复制项目mymvc4,新建项目mymvc5 package com.hy.filter; import java. ...

  6. React报错之React hook 'useState' is called conditionally

    正文从这开始~ 总览 当我们有条件地使用useState钩子时,或者在一个可能有返回值的条件之后,会产生"React hook 'useState' is called conditiona ...

  7. k8s-Pod基础

    制作镜像 第一个pod 搭建Harbor仓库 重启策略 启动命令 pod基本命令 设置环境变量 数据持久化和共享-hostPath 数据持久化和共享-emptyDir JSON格式编写pod文件 Co ...

  8. web监听器解析

    监听器是web三大组件之一,事件监听机制如下: 事件:某个事件,如果初始化上下文 事件源:事件发生的地方 监听器:一个对象,拥有需要执行的逻辑 注册监听:将事件.事件源.监听器绑定在一起.当事件源发生 ...

  9. 聊一款可以自动跳过手机APP广告的神器!

    平时使用手机,很多APP都有开屏广告,有些短的一两秒,长的三五秒,用起来浪费时间不说,有时候想点击跳过,一不小心还可以点进广告,进行跳转,让人很不舒服. 今天我给小伙伴们推荐一个可以跳过APP开屏广告 ...

  10. Star (欧拉函数)

    题面 Fernando won a compass for his birthday, and now his favorite hobby is drawing stars: first, he ma ...