I have a Spring boot application with application.yml
:
spring:
datasource:
driver-class-name: org.postgresql.Driver
url: *my_url*
password: *my_pass*
username: *my_username*
jpa:
properties:
hibernate:
jdbc:
batch_size: 15
#order_inserts: true
#order_updates: true
#batch_versioned_data: true
When I try to save 200 000 entities using the method saveAll(Iterable<S> entities)
, it saves all 200 000 entities at the same time, but I want to save batches of 15 entities at a time.
Is it possible to use Spring Data's SimpleJpaRepository
and Hibernate's batch?