New to Spring, I am trying to insert a List
into a table. Until now I have been using the SqlParameterSource
for b
I tested with code.
Map[] rs = new Map[1];
Map item1 = new HashMap<>();
item1.put("name", "Tien Nguyen");
item1.put("age", 35);
rs[0] = item1;
NamedParameterJdbcTemplate jdbc = new NamedParameterJdbcTemplate(datasource);
// datasource from JDBC.
jdbc.batchUpdate("call sp(:name, :age)", rs);
Hope it is easy to know. Thanks