慕斯卡6082547
2021-06-02 20:06
Attribute useGeneratedKeys is not allowed here
将外部的<select>改为<insert>即可,<select>中是没有这几个值的。
例:
<select id="addUser">
insert into mybatis.user (id,name,password) values (#{id},#{name},#{password})
</select>改为
<insert id="addUser" useGeneratedKeys="true" keyProperty="id">
insert into mybatis.user (id,name,password) values (#{id},#{name},#{password})
</insert>SpringBoot+MyBatis搭建迷你小程序
92206 学习 · 657 问题
相似问题