Previously, we had lots of recipes and snippets regarding how to build repositories using the Spring Data JPA module through Spring Boot 2.0. All the repository properties created earlier were mostly non-blocking that return typical collections of model data. This recipe will focus on asynchronous JpaRepository properties that retrieve Future<T>, CompletableFuture<T>, and ListenableFuture<T>.
Implementing asynchronous Spring Data JPA properties
Getting ready
Create a new Maven project, ch12-asyncjpa, that will implement the Spring Data JPA with asynchronous properties.