Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

VMware Exam 2V0-72.22 Topic 8 Question 58 Discussion

Actual exam question for VMware's 2V0-72.22 exam
Question #: 58
Topic #: 8
[All 2V0-72.22 Questions]

If a class is annotated with @Component, what should be done to have Spring automatically detect the annotated class and load it as a bean? (Choose the best answer.)

Show Suggested Answer Hide Answer
Suggested Answer: C, D

Contribute your Thoughts:

Cornell
15 days ago
Hmm, I'm not sure. I was leaning towards D, but now I'm second-guessing myself. Isn't the @Bean annotation used for manually registering beans?
upvoted 0 times
...
Emilio
16 days ago
I disagree, I think the correct answer is C. Specifying a valid @Scope for the class is necessary for Spring to manage the bean's lifecycle.
upvoted 0 times
Lucille
15 hours ago
I think the correct answer is B. You need to specify a valid @ComponentScan annotation in the Java configuration.
upvoted 0 times
...
...
Lawrence
28 days ago
I thought the correct answer was A. Specifying a valid bean name in the @Component annotation is important for Spring to detect the class as a bean.
upvoted 0 times
...
Kip
29 days ago
The correct answer is B. The @ComponentScan annotation is used to specify the package(s) where Spring should scan for annotated components.
upvoted 0 times
Kizzy
9 days ago
C) Ensure a valid @Scope for the class is specified.
upvoted 0 times
...
Chaya
10 days ago
B) Ensure a valid @ComponentScan annotation in the Java configuration is specified.
upvoted 0 times
...
Kelvin
14 days ago
A) Ensure a valid bean name in the @Component annotation is specified.
upvoted 0 times
...
...
Quentin
2 months ago
I'm not sure about that. I think it might also be A) Ensure a valid bean name in the @Component annotation is specified.
upvoted 0 times
...
Telma
2 months ago
I agree with Lina. @ComponentScan is used to specify the base packages to scan for components.
upvoted 0 times
...
Lina
2 months ago
I think the answer is B) Ensure a valid @ComponentScan annotation in the Java configuration is specified.
upvoted 0 times
...

Save Cancel