Question 1 · 1
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.)
Choose one answer.
- Ensure a valid bean name in the @Component annotation is specified.
- Ensure a valid @ComponentScan annotation in the Java configuration is specified.
- Ensure a valid @Scope for the class is specified.
- Ensure a valid @Bean for the class is specified.