What is a best solution for spring boot report generation?
I have a web app and I want to expose an endpoint to download a report offline.
The report will be accessed not so often.
I have in mind to code it using multithreading using CompletableFuture in spring or without it.
CompletableFuture miss-understanding
I seem to fail miserably at an apparently simple example with CompletableFuture
.
Why is thenAccept not working in the loop?
Playing around with CompletableFutures and I coincided these outputs that I am not able to make sense of. I will share two snippets which should behave same in my perception. But they are not.