Bird
0
0

Which annotation is used to enable asynchronous method execution in a Spring Boot application?

easy📝 Conceptual Q2 of 15
Spring Boot - Async Processing
Which annotation is used to enable asynchronous method execution in a Spring Boot application?
A@AsyncHandler
B@EnableAsync
C@AsyncException
D@AsyncExecution
Step-by-Step Solution
Solution:
  1. Step 1: Identify the annotation for async support

    Spring Boot uses @EnableAsync on configuration classes to activate async processing.
  2. Step 2: Verify other options

    Other options are not valid Spring annotations for enabling async.
  3. Final Answer:

    @EnableAsync -> Option B
  4. Quick Check:

    @EnableAsync = Enables async methods [OK]
Quick Trick: Use @EnableAsync to activate async support in Spring Boot [OK]
Common Mistakes:
  • Confusing @AsyncHandler with @EnableAsync
  • Using non-existent annotations like @AsyncException
  • Assuming @AsyncExecution enables async

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes