0

I came across a spring-project with a lot of <T> CrudRepository implementations, where lists of objects where saved frequently in two different manners:

repository.saveAll(List.of(content));

and

List.of(content).forEach(Repository::save);

I was wondering, is thesaveAll manner better performance-wise?

Stephan Hogenboom
  • 1,543
  • 2
  • 17
  • 29

0 Answers0