Backend Development
Spring Boot
Subjective
Oct 03, 2025
What is @Async annotation? How to enable async processing?
Detailed Explanation
@Async enables asynchronous method execution:\n\n@EnableAsync\n@SpringBootApplication\npublic class Application { }\n\n@Service\npublic class EmailService {\n @Async\n public CompletableFuture sendEmail(String to, String subject) {\n // Send email logic\n return CompletableFuture.completedFuture(null);\n }\n}
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts