<insert id="insert" useGeneratedKeys="true" keyColumn="uid" keyProperty="uid" parameterType="com.example.bishe.POJO.User" >
insert into user
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="age != null" >
age,
</if>
<if test="gender != null" >
gender,
</if>
<!-- <if test="_parameter != null " >-->
<!-- height as Height,-->
<!-- </if>-->
<!-- <if test="weight != null" >-->
<!-- weight,-->
<!-- </if>-->
<if test="username != null" >
username,
</if>
<if test="password != null" >
password,
</if>
<if test="phoneNumber != null" >
phoneNumber,
</if>
</trim>
传递的参数是bean,但是登录页面有些属性不是必填的我就没有加在登录页面,结果在mapper.xml文件里加了这两个映射后就一直给我报错!there is no getter for parameter Height in ......
试了把参数名改成_parameter也没有用,
注释掉后就好了。望大神解答