I believe A and B is correct.
The statement in A is exactly extracted from here: https://docs.spring.io/spring-boot/docs/3.0.0/reference/html/features.html#features.developing-auto-configuration.locating-auto-configuration-candidates
B is correct as it is stated as one of the many ways to customize your auto-configuration.
C is not correct as you can't just create a subclass of the auto-configuration class and expect it to work. You need to import that parent auto-configuration into a configuration of your own.
D is incorrect as component scanning has nothing to do with this.
E is actually also correct.
We have to chose only 2, I looked at which statement between A and E were exactly the same as in the Spring Docs. A was exactly the same as in the documentation.
This is a very peculiar question as it's answers are not really in the studying material, except for answer B.
I don't see why E is not also correct. I would have voted ABE if it was possible.
If your configuration needs to be applied in a specific order, you can use the before, beforeName, after and afterName attributes on the @AutoConfiguration annotation or the dedicated @AutoConfigureBefore and @AutoConfigureAfter annotations. For example, if you provide web-specific configuration, your class may need to be applied after WebMvcAutoConfiguration.
https://docs.spring.io/spring-boot/docs/3.0.0/reference/html/features.html#features.developing-auto-configuration.locating-auto-configuration-candidates mentions both A and E:
"If you want to order certain auto-configurations that should not have any direct knowledge of each other, you can also use @AutoConfigureOrder. That annotation has the same semantic as the regular @Order annotation but provides a dedicated order for auto-configuration classes."
B and C .
A. The @AutoConfigureAfter, @AutoConfigureBefore, and @AutoConfigureOrder annotations are used to control the order in which auto-configuration classes are applied, not to apply configuration in a specific order
It can't be C. It is not enough to simply subclass an auto-configuration class. It needs to be the same type of BEAN as the auto-configured bean. Not just the class.
upvoted 1 times
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Azuni
5 months, 1 week agoquakquak3
1 month, 1 week agorhuanca
9 months, 3 weeks agoAzuni
5 months, 1 week ago