The Spring Data
CrudRepository has various methods that return multiple instances of the entity managed by the repository. It does so by using
Iterable and not
List, as one might expect. In many cases, that is of no consequence, since you typically want to iterate over the result anyway. However, you might occasionally prefer a
List. In these cases,
Iterable is annoying.
I will write more about why that choice was made in the first place and how you can deal with it as long as you are on Spring Data 2.x. However, let me get the good news out first: