spring-projects/spring-data-examples

spring boot data jdbc 2.7.6 saveAll as batch insert

AleksandrNi opened this issue · 1 comments

good day!
I use spring-boot-starter-data-jdbc 2.7.6
saveAll SimpleJdbcRepository implementation is:
return Streamable.of(entities).stream() //
.map(this::save) //
.collect(Collectors.toList());

could you please add information how to configure project to use saveAll as batch insert.
Thanks!

Starting with 3.0.0 Spring Data JDBC will issue statements as batch statements as well as it can, so there is nothing to configure from the Spring Data JDBC side.
Some JDBC drivers might need additional configuration, but that would be a question for their respective support channels.

I therefore don't think we need an additional example here.