1.实体bean:ProductType 2.字段id,name ProductType.xml 中定义一个查询,如下: <parameterMap type="map" id="paramMap"> <parameter property="productType" javaType="com.nd.orm.ProductType" jdbcType="OTHER" /> <parameter property="pageSize" javaType="int" jdbcType="NUMERIC"/> </parameterMap> <select id="getScrollPage" parameterMap="paramMap" resultType="com.nd.orm.ProductType"> select * from ProductType where 1=1 <if test="productType.name!=null and productType.name!=''"> and name like #{productType.name} </if> </select> 查询: Map<String,Object> map=new HashMap<String, Object>(); ProductType a=new ProductType(); a.setName("XXXXX");//注意这里 map.put("productType", a); map.put("pageSize", 10); List p= session.selectList("ProductType.getScrollPage", map); 问题: 如果a.setName赋值了,查询没问题 可是如果a没有setName,系统就报错: Cause: org.apache.ibatis.executor.ExecutorException: There was no TypeHandler found for parameter productType of statement ProductType.getScrollPage