Spring @Async with CompletableFuture
Spring actually does all of the work behind the covers so you don’t have to create the CompletableFuture yourself. Basically, adding the @Async annotation is as if you called your original method (without the annotation) like: CompletableFuture<User> future = CompletableFuture.runAsync(() -> doFoo()); As for your second question, in order to feed it to an executor, … Read more