Spring Boot handles asynchronous operations through the @Async annotation, which offloads a method's execution to a separate thread pool so the calling thread doesn't block waiting for it to finish.
An order-processing service calls an @Async method to send a confirmation email after checkout, letting the HTTP response return immediately while the email is dispatched in the background.
@EnableAsync
@Configuration
public class AsyncConfig {}
@Service
public class NotificationService {
@Async
public CompletableFuture<Void> sendConfirmationEmail(String to) {
emailClient.send(to, "Order confirmed");
return CompletableFuture.completedFuture(null);
}
}A concise interview answer is
I enable async support with @EnableAsync and mark methods that shouldn't block the caller with @Async, returning a CompletableFuture when I need to track completion. It's ideal for things like sending emails or calling slow external services, since the main thread keeps going instead of waiting.
Last updated: 11 November 2026
Previous question: What is the purpose of having a spring-boot-starter-parent?