課程
/后端開發
/Java
/SpringBoot+MyBatis搭建迷你小程序
Attribute useGeneratedKeys is not allowed here
2021-06-02
源自:SpringBoot+MyBatis搭建迷你小程序 3-5
正在回答
將外部的<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搭建小程序后臺
1 回答請問這是什么原因
3 回答create test 里面不顯示方法是什么原因呢?
1 回答老師,問個問題,為什么我的yml配置文件jdbc的driver沒有提示
1 回答這個是什么原因
2 回答請問下老師問什么把autowired提示變為warn后,還是 創建不了areaDao bean
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2021-07-07
將外部的<select>改為<insert>即可,<select>中是沒有這幾個值的。
例:
改為