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 ...
随机推荐
- springboot读取properties(yml)的几种常用方式
boot项目中一些秘钥等不常变动的信息大多存储在配置文件中,那么我们怎么获取配置文件中的属性呢? 以获取server端口号为例讲解几种方法:配置信息如下 一:使用@Value注解 @Value(&qu ...
- Android RealativeLayout 布局gravity不能居中的解决办法
对于LinerLayout中的gravity发现复制到realativeLayout布局中发现不起作用,后来发现只要在他的每个子组件中使用 android:layout_centerVertical ...
- Node前后端分离基本概括
首先从一个重要的概念“模板”说起. 广义上来说,web中的模板就是填充数据后可以生成文件的页面. 严格意义上来说,应该是模板引擎利用特定格式的文件和所提供的数据编译生成页面.模板大致分为前端模板(如e ...
- 解决输入git branch 进入编辑状态,mac下出现END,无法返回
core.pager指定 Git 运行诸如log.diff等所使用的分页器,你能设置成用more或者任何你喜欢的分页器(默认用的是less), 当然你也可以什么都不用,设置空字符串: git conf ...
- Spring boot2.0 与 2.0以前版本 跨域配置的区别
一·简介 spring boot升级到2.0后发现继承WebMvcConfigurerAdapter实现跨域过时了,那我们就紧随潮流. 二·全局配置 2.0以前 支持跨域请求代码: import or ...
- CentOS6.5下搭建Samba服务实现与Windows系统之间共享文件资源
FTP文件传输服务确实可以让主机之间的文件传输变得简单方便,但是FTP协议的本质是传输文件,而非共享文件,因此要想通过客户端直接在服务器上修改文件内容还是一件比较麻烦的事情. 1987年,微软公司和英 ...
- rtrim
<?php $str = '14岁'; $new_str = rtrim($str, '岁'); echo $new_str; 如果右边是'岁',就过滤掉.
- git批量删除文件和批量提交
1. 单个删除文件: ① 通常直接在文件管理器中把没用的文件删了,或者用rm命令删了:(可选操作,可直接执行②删除) $ rm test.txt ② 确实要从版本库中删除该文件,那就用命令git rm ...
- vue双向绑定(数据劫持+发布者-订阅者模式)
参考文献:https://www.cnblogs.com/libin-1/p/6893712.html 实现mvvm主要包含两个方面,数据变化更新视图,视图变化更新数据. 关键点在于data如何更新v ...
- HTML 标记 3 —— 框架
<frameset cols="80,*" frameborder="no" border="0" framespacing=&quo ...