<update id="updateHome" parameterType="home"> update home set homeName=#{homeName},homeAddress=#{homeAddress},homePrice=#{homePrice} where homeId=#{homeId} </update> id是方法名字 parameterType是参数
不需要配置update和delete,insert的返回类型,默认返回int <update id="update" parameterType="string"> 对应的mapper public int update(String);
你的头像太搞笑了!
session.update方法不是返回一个int值吗!
默认调用就会返回的。
参考
update home set homeName=#{homeName},homeAddress=#{homeAddress},homePrice=#{homePrice}
where homeId=#{homeId}
</update>
id是方法名字 parameterType是参数
<update id="update" parameterType="string">
对应的mapper
public int update(String);