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
5 months agoBuck
5 months agoAn
5 months agoChan
5 months agoDante
6 months agoDahlia
6 months agoLillian
6 months agoJarvis
6 months agoIzetta
6 months agoLynna
6 months agoRobt
6 months agoAshlee
6 months agoMisty
7 months agoCornell
11 months agoEmilio
11 months agoJerry
10 months agoLeandro
10 months agoBrunilda
10 months agoLucille
11 months agoLawrence
12 months agoKip
12 months agoKizzy
11 months agoChaya
11 months agoKelvin
11 months agoQuentin
1 year agoTelma
1 year agoLina
1 year ago