1. 错误信息


HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘qo’ in 'class cn.wolfcode.rbac.qo.UserQo’
type Exception report

message Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: …

注意:

  • 请首先排除在 Qo 中真的没有写 get , set 方法的情况

2. 错误原因1

  • 在方法中忘记写, @Param(“qo”) 的注释

     int count(UserQo qo);

3. 解决办法

  • 加上注释就可以了
     int count(@Param("qo") UserQo qo);

4. 错误原因2

  • 在sql查询语句中应该使用 qo的地方忘记写了
<sql id="MySQL"><where><if test="qo.keyword!=null and qo.keyword!=''">and  username like conact('%',#{qo.keyword},'%')</if><if test="qo.appId!=null and qo.appId!=-1"><!--错误处-->and appId = #{appId}</if></where></sql>

5. 解决方法

  • 将缺少的地方写上即可

  <sql id="MySQL"><where><if test="qo.keyword!=null and qo.keyword!=''">and  username like conact('%',#{qo.keyword},'%')</if><if test="qo.appId!=null and qo.appId!=-1"><!--已填上-->and appId = #{qo.appId}</if></where></sql>
如有错误请各位大神指导,叩谢了!!

Exception:There is no getter for property named ‘qo‘ in ‘class cn.xxxxxx.rbac.qo.XxxxQo 的两种错误可能及解决方案相关推荐

  1. There is no getter for property named ‘keyword‘ in ‘class cn.wolfcode.qo.Subentry‘] with root caus

    当使用spring-mybatis集成来对部门员工进行增删改查时,在写员工过滤查询时,会添加两哥关键字和部门的编号,根据页面输入的关键字和数据库的员工的名字和邮箱编号对比,得到过滤查询,出现错误,说关 ...

  2. There is no getter for property named 'distinct' in 'class cn.ly.item.pojo.SpciGroup'] with root cau

    原因对mybatis还不是特别理解 List<SpciGroup> spciGroups = speciGroupMapper.selectByExample(spciGroup); 应该 ...

  3. 实力踩坑:There is no getter for property named ‘XXX‘ ‘class XXX‘

    实力踩坑:There is no getter for property named 'XXX' 'class XXX' 1.异常错误日志 2.分析原因解决 1.异常错误日志 org.apache.i ...

  4. MyBatis3: There is no getter for property named 'code' in 'class java.lang.String'

    mybatis3  : mysql文如下,传入参数为string类型时'preCode',运行报错为:There is no getter for property named 'preCode' i ...

  5. Mybatis问题:There is no getter for property named 'unitId' in 'class java.lang.String'

    Mybatis遇到的问题 问题: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.re ...

  6. 关于 There is no getter for property named ‘id‘ in ‘class java.lang.Integer‘

    errMsg=org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.R ...

  7. org.apache.ibatis.reflection.ReflectionException: There is no getter for property named XXX

    org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.Reflecti ...

  8. There is no getter for property named 'XXX' in class 'aaa.bbb.ccc'(终极骚操作的解决方法)...

    使用SpringBoot整合Mybatis时,遇到了像标题的异常,博主当时是用Bean类对象作为参数的,所以百度了很久都没有建设性答案.贴一下报错的xxxDao文件和xxxMapper.xml文件: ...

  9. 解决 There is no getter for property named ‘null‘ in ‘class 报错

    报错内容:   Resolved [org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.r ...

最新文章

  1. .9-Vue源码之AST(5)
  2. Memcache,Redis,MongoDB(数据缓存系统)方案对比与分析
  3. 学习这么美丽的事,你要不要和我一起?
  4. python如何分成两行_python将文本分每两行一组并保存到文件
  5. 无向图求割点(找桥)tarjan
  6. GaussDB(for Redis)揭秘:Redis存算分离架构最全解析
  7. Microsoft.System.Center.Operations.Manager.2007 中文版完整光盘下载地址
  8. uc3842改可调电源教程_《学习笔记》--DC/DC电源电路设计实例
  9. ANDROID 4.0 SDK R14 模拟器
  10. launchMode的几种模式
  11. C#基础温习(10):C#实现托盘功能
  12. Extjs5.0从入门到实战开发信息管理系统视频教程
  13. java jacob pdf_java利用jacob将word转pdf
  14. 谷歌Keras之父连发两文解析深度学习的局限性与未来
  15. CocosBuilder 的使用
  16. 怒肝3W字Java学习路线!从入门到封神全包了(建议收藏)
  17. python修改文件夹名字
  18. ValueError: Cannot have number of splits n_splits=10 greater than the number of samples: n_samples=0
  19. 服务器上模拟手机系统软件,云服务器可以用手机模拟器
  20. Redis学习之incr命令

热门文章

  1. Java--多线程之并发,并行,进程,线程(一)
  2. 使用Java SE8 Streams 处理数据,Part 2
  3. CoAP协议及开源实现
  4. 【JavaWeb】JQuery实现广告显示和隐藏动画效果
  5. 5个典型实例告诉你:什么是数据可视化
  6. 法国西南华人华侨商会:进军区块链行业,促进技术创新项目落地
  7. 微信小程序搭建怎么做?流程是怎么样?【小程序搭建】
  8. ng-alain php,在angular中基于ng-alain如何定义自己的select组件?
  9. 国际清算银行成员发布央行数字货币分析报告
  10. 不论微信钉钉还是什么软件,我写了个通用的消息监控处理机器人