参照:http://blog.csdn.net/huzheaccp/article/details/7399124
http://baike.baidu.com/link?url=AMTlWcRv7cfKzxm4DQH_wPnVF6Eei9jdwCvvjL9LmCz2bBj6Ko4QI3xqccY5y4CUZRvIj0-YK_ADCgTZ_VP4M_
Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String'
解决办法:http://blog.csdn.net/woshixuye/article/details/8820387
二、解决问题
<select id="queryStudentByNum" resultType="student" parameterType="string">
select num,name,phone from student<where>
<if test = " _parameter!=null and_parameter!='' ">
AND num = #{_parameter}
</if>
</where>
</select>
无论参数名,都要改成"_parameter"。
Mybatis默认采用ONGL解析参数,所以会自动采用对象树的形式取string.num值,引起报错。也可以public List methodName(@Param(value="num") String num)的方法说明参数值