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. js仿ppt,在线演示文档:Impress.js

    (附件) Impress.js是一款基于css3转 换和过渡.工作于现代浏览器(Google Chrome或Safari (或 Firefox 10 或 IE10)).并受prezi.com的理念启发 ...

  2. 【译】第10节---数据注解-Key

    原文:http://www.entityframeworktutorial.net/code-first/key-dataannotations-attribute-in-code-first.asp ...

  3. SQLServer代理新建或者编辑作业报错

    SQLServer代理新建或者编辑作业的时候报错如下 错误信息: 标题: Microsoft SQL Server Management Studio------------------------- ...

  4. Java SE LinkedList的底层实现

    关于实现链表的底层原理 链表便于增删,不便于查询 package com.littlepage.linkedList; /** * 基于底层实现LinkedList * @author Littlep ...

  5. JavaSE 字符串和正则表达式

    根据不懂的自己整理一下,跟着老师进度刷一遍课本,记录琐碎不懂知识 1.StringTokenizer类 String[] mess= {"整数部分","小数部分" ...

  6. ORACLE的rownum用法讲解

    如果选择踏足,终有一天你会爱上这条路. 今天讲讲ORACLE中关于ROWNUM的用法: 一.简单介绍一下ROWNUM是什么,可以用来干什么. 答:ROWNUM是一个序列,会根据sql语句自动给你加上一 ...

  7. 扩展EF的Fluent API中的 OnModelCreating方法 实现全局数据过滤器

    1.生成过滤的表达式目录树 protected virtual Expression<Func<TEntity, bool>> CreateFilterExpression&l ...

  8. 《剑指offer》第六十七题(把字符串转换成整数)

    // 面试题67:把字符串转换成整数 // 题目:请你写一个函数StrToInt,实现把字符串转换成整数这个功能.当然,不 // 能使用atoi或者其他类似的库函数. #include <ios ...

  9. 如何通过 Terminal 设置截图存储的位置

    由于截图的默认位置是存储在 desktop 上的,而 desktop 又是我们经常见的地方,有一个干净的界面对良好的电脑的体验非常重要,那么可以通过改变截图的默认的存储位置来改变.而改变这一路径需要用 ...

  10. slf4j/logback: logging日志的配置

    slf4j/logback: logging日志的配置 import依赖: import org.slf4j.Logger;import org.slf4j.LoggerFactory;private ...