欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

mybatis报错:Type handler was null on parameter mapping or property ‘__frch_xxx_0’

程序员文章站 2022-03-08 17:24:24
...

Type handler was null on parameter mapping or property ‘__frch_xxx_0’
mybatis报错:Type handler was null on parameter mapping or property ‘__frch_xxx_0’
可知是mapper.xml写错,因为使用foreach语句时,两个foreach标签中间的参数写错了

<select id=" get" parameterType="entity" resultMap="java.util.List">
  select id, name from t 
	where 
	id in
	  <foreach collection="list" item="param"  open="(" close=")" separator=",">  
	        #{param.id}
      这里直接用#{id}或#{param},就会报错
	  </foreach>   
</select>
相关标签: MyBtis