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. RN 实现简易浏览器

    import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Dimensions, ...

  2. Codeforces 600E. Lomsat gelral(Dsu on tree学习)

    题目链接:http://codeforces.com/problemset/problem/600/E n个点的有根树,以1为根,每个点有一种颜色.我们称一种颜色占领了一个子树当且仅当没有其他颜色在这 ...

  3. Centos7:查看某个端口被哪个进程占用

    查看端口被哪个进程使用的命令 netstat -lnp | grep 参考: https://blog.csdn.net/u010886217/article/details/83626236 htt ...

  4. chrome driver 下载

    https://npm.taobao.org/mirrors/chromedriver/ 解压后,把路径放到系统环境变量中即可 dirver = webdriver.Chrome()

  5. 小程序scss页面布局

    html <view class="main"> <form bindsubmit="feedback"> <textarea c ...

  6. C#发起HTTP请求

    浏览器能看到的数据  用后端模拟请求都能获取到  如果拿不到 看看是不是请求参数哪里没设置 刚好服务器检查了这个参数 string url = ""; string para = ...

  7. Android多线程模型

              作为开发者,我们都知道在开发过程中遇到耗时操作那是不可避免的,例如网络请求.文件读写.数据库操作等等.Android是单线程模型,这意味着Android UI操作并不是线程安全的并 ...

  8. Ajax同步

    转载自:https://blog.csdn.net/xiegongmiao/article/details/78217386 AJAX中根据async的值不同分为同步(async = false)和异 ...

  9. JS添加/移除事件

    事件的传播方式 <div id="father"> <div id="son"></div> </div> &l ...

  10. lua --- unpack

    unpack 返回数组中的所有元素,包括 nil,注意是数组,对于 k-v 是不返回的!!! do , ,o = } print(unpack(tab)) --默认从索引 1 开始 )) --从索引 ...