Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Async
- @Cacheable(value="distributors")
- public CompletableFuture<Iterable<Distributors>> getAllDistributorsAsyncCaching() throws ExecutionException, InterruptedException {
- Iterable<Distributors> result = distributorsRepository.findAll();
- return CompletableFuture.completedFuture(result);
- }
- @Async
- @Cacheable(value="distributors")
- public Iterable<Distributors> getAllDistributorsAsyncCaching() throws ExecutionException, InterruptedException {
- Iterable<Distributors> result = distributorsRepository.findAll();
- return CompletableFuture.completedFuture(result);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement