Caused by: org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 65; 必须为元素类型 "insert" 声明属性 "useGeneratedkeys"。
Caused by: org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 65; 必须为元素类型 "insert" 声明属性 "useGeneratedkeys"。
<mapper>文件
<insert id="insertCommodity" useGeneratedkeys="true" keyProperty="commodityId" keyColum="commodity_id" parameteerType="com.seer.demoshop.entity.Commodity"> INSERT INTO commodity(commodity_id,commodity_name,commodity_sales,create_time,last_edit_time) VALUE (#{commodityId},#{commodityName},#{commoditySales},#{createTime},#{lastEditTime}) </insert> <update id="updateCommodityId" resultType="com.seer.demoshop.entity.Commodity"> UPDATE commodity <set> <if test="commodityName!=null">commodity_name=#{commodityName},</if> <if test="commoditySales!=null">commodity_sales=#{commoditySales},</if> <if test="lastEditTime!=null">last_edit_time=#{lastEditTime}</if> </set> WHERE commodity_id=#{commodityId} </update> <delete id="deleteCommodity"> DELETE FROM commodity WHERE commodity_id=#{commodityId} </delete>