1.There is no getter for property named 'xxx'..........
出现的原因:mybatis在接受简单类型参数的时候没有和数据库的数据映射上(及参数没有传到数据库)
两种解决办法:
(1)在mybatis 的映射文件(xxx.xml)中把传入的简单类型参数都改写成'_parameter'
<if test="name != null"> <if test="_parameter != null">
and id = #{name} and id = #{_parameter}
</if> </if>
修改之前 修改之后
(2)也是在映射文件中使用拼接字符串的格式(${})
<if test="value != null">
and id = ${value}
</if>