org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'list' in 'class com.bw.yun.pojo.Page'

报了这个错。今天一直都在该这个方法以及优化

我的是目的是:在我的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的更多相关文章

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

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

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

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

  5. 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 ' ...

  6. 【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 ...

  7. 已解决: 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 ...

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

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

随机推荐

  1. 增强 用文本增强修改SAP标准屏幕中的字段名称 属于元素的文本增强

    如果想要改变标准屏幕中的字段名称,如把物料主数据基本数据元素的名字改为我们想要的名字 . 1.首先,事务MM03进入物料主数据的基本数据2视图中,将鼠标光标放在需要更改的字段“页格式”上,然后按F1键 ...

  2. JavaScript知识点整理

    1.JavaScript的定义 JavaScript是一种专门为与网页交互而设计的脚本语言.有下列三部分组成 ①ECMAScript,提供核心语言功能 ②文档对象模型(DOM),提供访问与操作网页内容 ...

  3. VirtualBox-- 虚拟机网络设置2--主机与虚拟机互相访问且均上外网

    转载自:http://blog.sina.com.cn/s/blog_7de9d5d80100t2uw.html   VirtualBox中有4中网络连接方式:NATBridged AdapterIn ...

  4. python os.remove

    remove 只能删除文件,删除目录会报错 >>> import os >>> os.remove("/opt/xxx/server_log/test&q ...

  5. C++.运行时类型判断_测试代码

    ZC:C++ 编程思想——运行时类型识别 - 浅墨浓香 - 博客园.html(https://www.cnblogs.com/5iedu/articles/5585895.html) -------- ...

  6. EXpression 表达式目录树

    表达式树   前面n-1的是一个表达式  最后一个是一个表达式  一直拆开拆到最后 继承ExpressionVisitor的类  可以重写获取到表达式树的方法进行扩张和改写 委托是编译成一个方法 表达 ...

  7. python 安装包

    一般python的包都是.tar.gz结尾的压缩包,据说是linux下面的格式.但也是可以在windows上面安装的,安装过程,1,在 https://pypi.python.org/pypi 这个网 ...

  8. BZOJ 3585 mex

    题目已经没有了 思路: 莫队+分块 首先有一个结论:所有的答案都在0到n之间,用反正法就能证明,所以所有大于n的数都可以看成n 离线,对询问区间进行莫队,再对答案的范围0到n进行分块 复杂度(n+2* ...

  9. js数组,字符串,json互相转换函数有哪些

    js数组,字符串,json互相转换函数有哪些 一.总结 一句话总结: JSON.stringify(arr) JSON.parse(jsonString) str.split('') array.jo ...

  10. 在不进入Guest OS的情况下,取得Guest OS的IP地址

    因为是个Headless 服务器,总是需要GUI VNC 到 Host OS, 然后进入里面的虚拟机,打 ipconfig / ifconfig  ,非常的不方便. 查了网上,找到上面的方法 1)确保 ...