Method 1 (only for insert) : To add multiple record into "product" table The XML file is as follows <insert id="insertList" parameterType="HashMap" useGeneratedKeys="true"> INSERT INTO product (vendor_id, name ,description) VALUES <foreach collection="paramList" item="param" separator=","> (#{param.vendorId}, #{param.name}, #{param.description}) </foreach> </insert> The invoking Java code is as follows List products = new ArrayList(); HashMap<String, Object> para = new HashMap<String, Object>(); Product product1 = new Product("vendor_id1,"pen","good pen"); Proudct product2 = new Product("vendor_id1,"book","good book"); products.add(product1); products.add(product2); para.put ("paramList",products); Integer status = mapper.insertList(para); Method 2: (work both for insert and update) You also...