Posted by: Pdfprep
Post Date: January 10, 2021
If you annotate one of your classes with @Component, which of the following should you do to have Spring automatically detect your class and load it as a bean? (Select one or several answers)
A . Ensure that you specify a valid bean name in the @Component annotation
B . Ensure that you specify a valid @Scope for the bean
C . Ensure that you have added <context:component scan> in the XML configuration
D . Ensure that <context: annotation-config/> is specified in the XML configuration
Answer: C
Leave a Reply