标签:prope static insert use parameter gen values 主键 ram
<insert id="xxx" parameterType="com.yanan.Test" keyProperty="testId" useGeneratedKeys="true">
insert into Test(name) values(#{name})
</insert>
public static class Test{
private int testId;
private String name;
getter和setter
}
parameterType必须用与表对应的类接收
标签:prope static insert use parameter gen values 主键 ram
原文地址:https://www.cnblogs.com/yanan7890/p/12909677.html