First posted the code
先说一下springmvcc中的<forEach collection="array" index="index" item="id" open="(" separator="," close=")"></forEach>
Each attribute this first look inside
On behalf of collection is a collection, if you traverse is an array then use the array, if you use a List list, which is a good definition of the framework,
index is the number of traversed, rather in the for loop i,
item is an alias, you can write any
and open and close the separator will use an example, such as you pass the array is Integer [1,2,3,4,5], then delete sql statement is delete from table where id in (1,2 , 3,4,5) where we are using forEach use in the
The first fragment is not used to write code reuse sql poor
The second is the use of the sql fragment
List there behind me and I again encountered Map Update!