I have a Spring service:
@Service @Transactional public class SomeService { @Async public void asyncMethod(Foo foo) { // processing takes si
In case your method returns CompletableFuture use join method - documentation CompletableFuture::join.
CompletableFuture
join
This method waits for the async method to finish and returns the result. Any encountered exception is rethrown in the main thread.