org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'list' in 'c
报了这个错。今天一直都在该这个方法以及优化
我的是目的是:在我的dao中根据一个对象字段进行查询,返回一个 list<对象> ,我的实体类是这样的
然后我的sql语句是这样的
主要说一下这个collection是你实体类的字段名,item 是你给该字段起的别名 ,其他的大家应知道吧。
然后我的错误是把collection 写为list 其实是错误的。应该是实体类的字段名。
注意:
Mapper.xml
<select id="getFileStrByDts" resultType="FileStr">
select * from
fileStr
where dt in
<foreach collection="dts" index="index" item="dt" open="("
separator="," close=")">
#{dt}
</foreach>
limit #{start_index},#{page_rows}
</select>
接口中:
/**
* 根据路径返回文件
*
* @param dt
* @return
*/
public List<FileStr> getFileStrByDts(Page page);
就是这个样子的
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'list' in 'c的更多相关文章
- Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'zoneId' in 'class java.lang.String'
本文为博主原创,未经允许不得而转载: 异常展示: dao层定义的接口为: public int getClientTotal(); 在mybatis中的sql为: <select id=&quo ...
- org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'parentId' in 'class java.lang.String'
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ' ...
- mybatis之org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'time' in 'class java.lang.String'
mybatis接口 List<String> getUsedCate(String time); 配置文件 <select id="getUsedCate" pa ...
- Mybatis笔记四:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'id' in 'class java.lang.String'
错误异常:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for pr ...
- Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'company' in 'class java.lang.String'
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ' ...
- 【Mybatis】mybatis查询报错org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'areaName' in 'class java.lang.String'
mybatis查询报错: Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for pro ...
- 已解决: mybatis报错 org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'xxx' in 'class java.lang.String'
最近在练习MyBatis时 进行姓名的模糊查询时候出现 org.apache.ibatis.exceptions.PersistenceException: ### Error querying da ...
- Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'empid' in 'class cn.happy.entity.Emp'
org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.i ...
- nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'enterpriseId' in 'class java.lang.String'
错误信息: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for p ...
随机推荐
- SAP月结操作讲解
SAP月结操作讲解 https://wenku.baidu.com/view/ac6fe45d312b3169a451a4b9.html 步聚 操作内容 事务码 是否必须 操作时间 月/年结 1 ...
- js 数组、对象转json 以及 json转 数组、对象
let jsonObj = $.parseJSON(jsonStr); //json字符串转化成json对象(jq方法) var jsonObj = JSON.parse(jsonStr); //js ...
- Java 虚拟机 最易理解的 全面解析
先上一个最容易理解的类实例化的内存模型案例截图: 转载自:https://www.zybuluo.com/Yano/note/321063 周志明著的<深入理解 Java 虚拟机>的干货~ ...
- P4391 [BOI2009]Radio Transmission
描述: 给你一个字符串,它是由某个字符串不断自我连接形成的. 但是这个字符串是不确定的,现在只想知道它的最短长度是多少. 输入格式: 第一行给出字符串的长度,1 < L ≤ 1,000,000. ...
- P1622 释放囚犯
传送门 区间DP简介: 在写这题前,需要先弄清楚区间DP是如何操作的: 区间DP的做法还是相对固定的,没有其他类型DP的复杂多变.主要思想就是先在小区间进行DP得到最优解,然后再利用小区间的最优解合并 ...
- Java Virtual Machine(Java虚拟机)
JVM是Java Virtual Machine(Java虚拟机)的缩写,JVM是一种用于计算设备的规范,它是一个虚构出来的计算机,是通过在实际的计算机上仿真模拟各种计算机功能来实现的. Java语言 ...
- Cannot find a valid baseurl for repo: base/7/x86_6 解决方法
安装centos7后发现不能上网, sudo vi /etc/sysconfig/network-scripts/ifcfg-ens33 将ONBOOT=no改为ONBOOT=yes 然后重启网络服务 ...
- ubuntu16系统磁盘空间/dev/vda1占用满的问题
参考文档: https://www.cnblogs.com/moonandstar08/p/6091507.html (系统磁盘空间/dev/xvda1占满原因分析) https://blog.csd ...
- ipconfig/all参数解析
本人是在搭建虚拟机时经常需要用到ipconfig/all名称查看宿主机的配置,但是对于该命令下的一些设置经常弄混,所以就花了点时间研究了一下. 参考文献:https://www.cnblogs.com ...
- [转]pugixml使用教程
转自:https://www.cnblogs.com/ltm5180/p/3989125.html pugixml介绍 pugixml是一个高性能.轻量级并且简单易用的xml解析库,支持UTF8 en ...