2V0-72-22 practice question 4 of 15
Which two statements are correct regarding Spring Boot auto-configuration customization? (Choose two.)
Full set: 79 questionsSpring Boot's auto-configuration is highly customizable. Two primary methods for customization are ordering and exclusion. To control the sequence of auto-configuration, developers can use @AutoConfigureAfter or @AutoConfigureBefore on their configuration classes to establish a relative order. To prevent an auto-configuration class from being applied, it can be disabled using the exclude attribute on the @EnableAutoConfiguration annotation (which is meta-annotated on @SpringBootApplication).
C. Subclassing Spring Boot's auto-configuration classes is discouraged; the preferred method is to define your own beans, which will override the defaults.
D. Auto-configuration classes are loaded via a dedicated mechanism (spring.factories or auto-configuration imports) and should not use general component scanning.
E. While @AutoConfigureOrder is a valid annotation for absolute ordering, options A and B represent two distinct and fundamental customization techniques (relative ordering and exclusion), making them the best pair of answers.
1. Spring Boot Reference Documentation. Section: "Disabling Specific Auto-configuration Classes". "If you find that specific auto-configuration classes are being applied that you do not want, you can use the exclude attribute of @EnableAutoConfiguration to disable them".
2. Spring Boot Reference Documentation. Section: "Ordering Auto-configuration". "If you want to order configurations that should be applied after/before some other auto-configurations, you can use the @AutoConfigureAfter or @AutoConfigureBefore annotations."
Keep practicing
Take the free 2V0-72-22 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 2V0-72-22 practice questions
- Question 1Which two statements describe Spring JdbcTemplate? (Choose two.)
- Question 2Which two options will inject the value of the daily.limit system property? (Choose two.)
- Question 3Which two statements are true regarding Spring and Spring Boot Testing? (Choose two.)
- Question 5Which two statements are true about @Controller annotated classes? (Choose two.)
- Question 6Which statement is true? (Choose the best
- Question 8Which two statements are correct regarding the Health Indicator status? (Choose two.)
