Type handler was null on parameter mapping for property '__frch_productId_0'. It was either not spec
2017-07-21 17:00
656 查看
出现如上错误,原因: 在mybatis使用<foreach>标签的时候 , collection 为传入的List item为里面的对象,如果直接对item取值就会出现如此错误。
解决:对item进行取值
------------------------------------------------------
bean : student{id ,name,gender,score}
dao: public List<student> getStudentList( List<student> param);
注: 这里通过student 的id来查询学生信息
XML:<foreach collection="param" index="index" item="l" open="("
separator="OR" close=")">
id= #{id}
错误写法
id=#{l.id}
正确写法
</foreach>
解决:对item进行取值
------------------------------------------------------
bean : student{id ,name,gender,score}
dao: public List<student> getStudentList( List<student> param);
注: 这里通过student 的id来查询学生信息
XML:<foreach collection="param" index="index" item="l" open="("
separator="OR" close=")">
id= #{id}
错误写法
id=#{l.id}
正确写法
</foreach>
相关文章推荐
- Type handler was null on parameter mapping for property '__frch_uid_0'
- Type handler was null on parameter mapping for property '__frch_id_0'
- mybatis插入操作时遇到的坑Type handler was null on parameter mapping for property 'xxx'.
- 关于spring整合mybatis报错:Type handler was null on parameter mapping for property 'department'.
- 异常org.apache.ibatis.executor.ExecutorException: There was no TypeHandler found for parameter..
- Name for parameter binding must not be null or empty! On JDKs < 8, you need to use @Param for named
- Property 'edgesForExtendedlayout' not found on object of type
- Null value was assigned to a property of primitive type setter of cn.itcast.oa.domain.Forum.topicCou
- The tag handler class for "c:forEach" (org.apache.taglibs.standard.tag.rt.core.ForEachTag) was not found on the Java Build Path
- Null value was assigned to a property of primitive type setter of cn.itcast.oa.domain.Forum.topicCount
- 关于JSP中使用EL表达式遇到的错误Property 'productId' not found on type com.imooc.hello.Product
- @RequestParam注解使用:Name for argument type [java.lang.String] not available, and parameter name information not found in class file either.
- Property 'edgesForExtendedlayout' not found on object of type 解决方案
- 异常:There was no TypeHandler found for parameter id of statement
- The tag handler class for "c:set"(org.apache.taglibs.standard.tag.rt.core.UrlTag)was not found on the Java Build Path
- Property 'value' not found on type java.lang.String的错误原因
- javax.el.PropertyNotFoundException: Property 'id' not found on type java.lang.String
- javax.el.PropertyNotFoundException: Property 'Name' not found on type com.min.test.User
- angular2 Property 'map' does not exist on type 'Observable<Response>'.
- org.hibernate.PropertyAccessException:Null value was assigned to a property of primitive type setter