2018-12-27から1日間の記事一覧

【JDBC】SimpleJdbcInsertで複数の要素を一気にInsertする

BeanPropertySqlParameterSourceの配列を作ってSimpleJdbcInsert#executeBatchに入れるとできます。 //配列を作る関数 private BeanPropertySqlParameterSource[] makeParamArray(List entities){ BeanPropertySqlParameterSource[] sources = new BeanPrope…