springmvc batch updates, and forEach operation

To perform the update operation springmvc There are two conditions

First: make mysql support batch updates

This is to configure the url (configuration database connectivity) of

To add allowMultiQueries = true in the url, it means the support for multiple statements

The second is to write sql statement, this must use <foreach> </ foreach> This tag is the use of the sql fragment

This means that white is the implementation of a number of update statements

 

Guess you like

Origin www.cnblogs.com/tranquilityMan/p/10973648.html