或许是惯性思维,在mybatis使用foreach循环调用的时候,很多时候都是传一个对象,传一个List的情况很少,所以写代码有时候会不注意就用惯性思维方法做了。

今天向sql传参,传了一个List作为参数,然后在xml里再foreach循环调用。然后报错信息如:

mybatis foreach报错It was either not specified and/or could not be found for the javaType

Type handler was null on parameter mapping for property '__flowStepCode_0

Mapper接口

List<AllocationHandlerInfoVo> listAllocatedHandlerInfo(@Param("flowStepCodeList")List<ApprStepModel> flowStepCodeList);

原来是这样:#{flowStep},处理方法,换成#{flowStep.flowStepCode},List是个集合来的,要注意,写博客记录

 <if test="flowStepCodeList != null and flowStepCodeList.size() > 0">
fh.flow_step_code in
<foreach collection="flowStepCodeList" item="flowStep" index="index" open="(" close=")" separator=",">
#{flowStep.flowStepCode}
</foreach>
</if>

mybatis foreach报错It was either not specified and/or could not be found for the javaType Type handler的更多相关文章

  1. spring 整合Mybatis 《报错集合,总结更新》

    错误:java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldExcepti ...

  2. JSP标签c:forEach报错(一)

    1.jsp标签c:forEach报错,具体错误如下: 三月 31, 2014 9:31:14 下午 org.apache.catalina.core.StandardWrapperValve invo ...

  3. Mybatis数据库连接报错:对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾

    Mybatis数据库连接报错:对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾 ============================== 蕃薯耀 ...

  4. 【mybatis】mybatis访问报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 或者 feign被调用方使用的mybatis总报空指针异常java.lang.NullPointerException,而变量都没有问题的情况

    mybatis访问报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 需要检查的步骤: ...

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

  6. myBatis查询报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

    myBatis查询报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL se ...

  7. MyBatis批量操作报错:Parameter 'xxxList' not found. Available parameters are [list]

    问题背景: 在Dao中使用MyBatis进行查询操作,参数是传的一个List:studentNameList,但是在执行查询的时候报错,具体日志如下: com.chenzhou.base.mybati ...

  8. 【JSP jstl c标签】使用c:foreach 报错(警告)”test does not support runtime expressions“

    后台封装的数据是个list,传递给前台,显示如下: <c:forEach items="${userInfo}" var="user"> 用户Nam ...

  9. Spring+Mybatis整合报错Mapped Statements collection does not contain value原因之一

    报错如下: ### Error updating database. Cause: java.lang.IllegalArgumentException: Mapped Statements coll ...

随机推荐

  1. CSS网页布局

    注:优化样式表:增加css样式表的可读性 减伤样式重复 一.主要内容 1.布局分类;131   121 2.display属性排版 3.float属性排版(横向多列布局) 4.防止父类盒子塌陷 二.标 ...

  2. 进程&线程(转)

    (摘自:http://www.cnblogs.com/CareySon/archive/2012/05/04/ProcessAndThread.html) 在传统的操作系统中,进程拥有独立的内存地址空 ...

  3. this()基础用法

    this()表示调用构造方法,此种调用只能用在构造方法中,即构造方法中调用构造方法this(实参). 1.this().this(实参)必须方法构造方法的第一行 2.在有参数构造方法中调用无参数构造方 ...

  4. UE4的委托

    UE中委托的使用很广泛,许多Event的触发都有对应的虚函数和委托,虚函数不用讲,只能在派生类中使用,而委托可以在别的类或者蓝图中使用,就应用范围而言,委托的使用更灵活.以AActor的 /** * ...

  5. Python 3.6安装yaml时报"AttributeError: module 'pip' has no attribute 'main'"和“Non-zero exit code”错误

    1.Python 3.6安装yaml时一开始报AttributeError: module 'pip' has no attribute错误,根据网上提供的解决方法修改Pycharm安装目录D:\Pr ...

  6. IntelliJ IDEA2017 + tomcat 即改即生效 实现热部署

    https://www.cnblogs.com/1024zy/p/6344000.html

  7. 《Linux就该这么学》第十九天课程

    今天对“Linux就该这么学”课程做个收尾 最后一张使用LNMP架构部署动态网站环境 第1步:下载及解压源码包文件.为了方便在网络中传输,源码包文件通常会在归档后使用gzip或bzip2等格式进行压缩 ...

  8. Ajax基本语法

    案例代码: $(function(){ $('#send').click(function(){ $.ajax({ type: "GET", url: "test.jso ...

  9. 去掉ACM论文左下角和页眉

    在\documentclass下添加如下命令: \fancyhead{} //去掉页眉 \settopmatter{printacmref=false} % Removes citation info ...

  10. python turtle库

    turtle库初步 先看 https://www.cnblogs.com/chy8/p/9448606.html 一 turtle库介绍 turtle乌龟 import turtle from tur ...