VMware vRealize Automation 8.x (2022) — Question 6
Which two statements are correct regarding the @EnableAutoConfiguration annotation? (Choose two.)
Answer options
- A. It is a meta-annotation on the @SpringBootApplication composed annotation.
- B. It enables auto-configuration of the ApplicationContext by attempting to guess necessary beans.
- C. It is meta-annotation on the @SpringBootConfiguration composed annotation.
- D. It has the same effect regardless of the package of the class that is annotated with it.
- E. It ensures auto-configuration is applied before user-defined beans have been registered.
Correct answer: A, B
Explanation
Option A is correct because @EnableAutoConfiguration is indeed a part of the @SpringBootApplication annotation. Option B is also correct as it describes how the annotation attempts to automatically configure the application context by inferring the required beans. Options C, D, and E are incorrect; C misidentifies the meta-annotation, D incorrectly asserts package independence, and E falsely claims the order in which configurations are applied.