Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam 2V0-72.22 All Questions

View all questions & answers for the 2V0-72.22 exam

Exam 2V0-72.22 topic 1 question 44 discussion

Actual exam question from VMware's 2V0-72.22
Question #: 44
Topic #: 1
[All 2V0-72.22 Questions]

Which two statements are correct regarding Spring Boot auto-configuration? (Choose two.)

  • A. Auto-configuration uses @Conditional annotations to constrain when it should apply.
  • B. Auto-configuration could apply when a bean is missing but not when a bean is present.
  • C. Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.
  • D. Auto-configuration could apply when a bean is present but not when a bean is missing.
  • E. Auto-configuration is applied before user-defined beans have been registered.
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Lych33
Highly Voted 11 months, 2 weeks ago
Selected Answer: AC
E is wrong since auto-configuration is applied AFTER user-defined beans have been registered.
upvoted 5 times
C4RNAGE
8 months, 1 week ago
C is wrong auto-configuration classes are here META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports and not spring.factories
upvoted 1 times
softarts
4 months, 3 weeks ago
C is correct, the actual processing is in spring.factories
upvoted 2 times
...
...
...
C4RNAGE
Most Recent 8 months, 1 week ago
Selected Answer: AB
A and B are correct. A) Spring Boot's auto-configuration classes use conditional annotations to set up auto configuration B) B is right because Auto-configuration can apply when any auto-configuration bean is missing after initializing user-defined beans (E is wrong due to this, since user defined beans are always loaded first, before auto-configuration applies) but it can not apply when bean is present. for example, if I as a developer, define auto-configuration bean myself and they are initialized by user's custom definition, then auto-configuration will not apply for that specific class.
upvoted 1 times
...
Tolo01
1 year, 3 months ago
Selected Answer: AE
I think A and E are the best answer
upvoted 1 times
C4RNAGE
8 months, 1 week ago
E is not correct. User-defined beans are always loaded first before auto-configuration applies. Thus, if you define your own Bean types which would be auto-configured otherwise, auto-configuration will not apply for that specific bean. For example, if I define DataSource bean in my own configuration class, my DataSource bean will initialize and auto-configuration will not configure any other DataSource anymore, since my DataSource bean is present.
upvoted 1 times
...
...
rhuanca
1 year, 8 months ago
A and C Auto-configuration could apply when the bean is present or not and Auto-configuration is applied after user define , in that way can take user define confg.
upvoted 3 times
...
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.

SaveCancel
Loading ...