在写筛选查询时,参数为对象,显示此参数找不到,报这个错误,几经研究查询

ERROR o.jeecg.common.exception.JeecgBootExceptionHandler:79 - nested exception is org.apache.ibatis.binding.BindingException: Parameter 'email' not found. Available parameters are [pageNo, pageSize, param3, user, userId, param4, param1, param2]
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'email' not found. Available parameters are [pageNo, pageSize, param3, user, userId, param4, param1, param2]at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:96)at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)at com.sun.proxy.$Proxy134.selectList(Unknown Source)

xml文件是这样子写的,是因为没有取到值,传的是对象应为对象.字段

<if test="email!=null and      email!=''">AND u.email like concat("%",#{email},"%")</if><if test="phone!=null and      phone!=''">AND u.phone =like  concat("%",#{phone},"%")</if>

改成这样子就可以了:

<if test="user.email!=null and   user.email!=''">AND u.email like concat("%",#{user.email},"%")</if><if test="user.phone!=null and user.phone!=''">AND u.phone =like  concat("%",#{user.phone},"%")</if>

nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘email‘ not found. Availab相关推荐

  1. Mybatis报错:nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘XXX‘ not found

    问题 使用Mybatis过程中报错 nested exception is org.apache.ibatis.binding.BindingException: Parameter 'XXX' no ...

  2. nested exception is org.apache.ibatis.binding.BindingException: Parameter 'xxxx'解决方案

    最近写一个ssm项目,遇到了一个没遇到过的问题: nested exception is org.apache.ibatis.binding.BindingException: Parameter ' ...

  3. nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘xxx‘ not found错误的详细解决方法

    文章目录 1. 复现错误 2. 分析错误 3. 解决错误 4. 文末补充 1. 复现错误 今天写好导入hive表的回调接口,如下代码所示: /*** hive表导入的回调接口** @author su ...

  4. 错误nested exception is org.apache.ibatis.binding.BindingException

    错误 错误:nested exception is org.apache.ibatis.binding.BindingException: Parameter 'name' not found. Av ...

  5. nested exception is org.apache.ibatis.binding.BindingException:

    用mybatis的xml文件进行ORM模式,出现下面错误 nested exception is org.apache.ibatis.binding.BindingException: Paramet ...

  6. nested exception is org.apache.ibatis.binding.BindingException: Invalid boun

    异常 nested exception is org.apache.ibatis.binding.BindingException: Invalid boun 在测试Spring MVC+Mybati ...

  7. 解决mapper绑定异常:nested exception is org.apache.ibatis.binding.BindingException:

    ssm 访问时一直报错,找不到mapper nested exception is org.apache.ibatis.binding.BindingException: Invalid boun 原 ...

  8. 【JAVA】解决mapper绑定异常:nested exception is org.apache.ibatis.binding.BindingException:

    异常: 原因: 由于mapper接口编译后在同一个目录下没有找到mapper映射文件而出现的.由于maven工程在默认情况下src/main/java目录下的mapper文件是不发布到target目录 ...

  9. 【SSM】nested exception is org.apache.ibatis.binding.BindingException: Invalid boun原因总结

    今天在整合SSM框架时,遇到如下问题,尝试了网上很多方法,终于成功解决,相信以下方法可以解决大多数人的问题. 排查方法如下: 1.mapper接口和mapper.xml是否在同一个包(package) ...

最新文章

  1. 数据库和服务器什么协议,数据库服务器协议
  2. linux 删除mysql
  3. Java调用PHP,跑PHP代码
  4. 活动报名 | 启元星际AI顶级职业选手挑战赛周日开赛,邀您在线见证!
  5. 为什么在64位系统中指针的大小是8,而32位系统中却是4?
  6. 举例详细说明javascript作用域、闭包原理以及性能问题(转)
  7. 有许多部分没有在cgroup中显示啊,current/high/low/min等等
  8. 入门视频采集与处理(BT656简介) 转
  9. Linux的Qt编译出现:-1: error: cannot find -lGL问题的解决方法
  10. 抓包分析arp攻击Linux,从抓包分析角度分析arp攻击
  11. drbd相关知识点解析
  12. python函数返回值的应用
  13. DelphiXE4发布了
  14. 如何对网页的加载进行性能优化
  15. C语言实现—学生成绩管理系统(Linux下运行)
  16. 【UML 建模】在线UML建模工具 ProcessOn 使用详解
  17. MySQL - 唯一索引
  18. 计算机表格对比功能怎么用,两个excel表格数据对比差异_怎么用vlookup对比两个表格的差异...
  19. 全通系统定义、零极点关系、应用
  20. 关于“未使用GUID分区表”无法安装的解决方案

热门文章

  1. 时间都去哪儿了?互联网3.0时代,好多东西都已“碎片化”
  2. windows 打开PyCharm报错failed to load JVM DLL pycharm\jbr\\bin\server\jvm.dll
  3. 【测试】bug的生命周期和组成部分
  4. Windows CMD 常用命令指示符
  5. 什么是ThreadLocal ?
  6. java五位随机验证码的实现。要求前四位是随机大小写的字母,最后一位是数字的组合。例如qWrY4
  7. 暴笑三国(有点不雅)
  8. Tableau技巧(一)如何做分页预览
  9. 项目三:声乐盒(音节+音乐)实验
  10. 超码、候选码、主码(主键)、主属性、非主属性、关系数据库中的依赖、关系数据库范式、反范式