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.)
I'm feeling pretty confident about this one. The answer is definitely B. The @ComponentScan annotation is what tells Spring to automatically detect and load the @Component annotated classes. Simple as that!
Okay, I think I've got this. The key is to make sure the @ComponentScan annotation is properly configured to scan the package where the @Component annotated class is located. That should do the trick.
Hmm, I'm a bit confused on this one. I know the @Component annotation is used to mark a class as a Spring bean, but I'm not sure what else needs to be done to have it automatically loaded. I'll have to review my notes on Spring configuration.
I'm pretty sure the answer is B. We need to have a valid @ComponentScan annotation in the Java configuration to get Spring to automatically detect the @Component annotated class.
Heike
3 months agoBuck
3 months agoAn
3 months agoChan
4 months agoDante
4 months agoDahlia
4 months agoLillian
4 months agoJarvis
4 months agoIzetta
5 months agoLynna
5 months agoRobt
5 months agoAshlee
5 months agoMisty
5 months agoCornell
9 months agoEmilio
9 months agoJerry
8 months agoLeandro
8 months agoBrunilda
9 months agoLucille
9 months agoLawrence
10 months agoKip
10 months agoKizzy
9 months agoChaya
9 months agoKelvin
9 months agoQuentin
11 months agoTelma
11 months agoLina
11 months ago