Broadcom-VMware
2V0-72.22PSE · Question #83
2V0-72.22PSE Question #83: Real Exam Question with Answer & Explanation
The correct answer is A. Ensure bean classes are annotated with the @Component annotation. B. Add the @ComponentScan ("com.mycomp. service") to the Java configuration.. See the full explanation below for the reasoning.
Question
Spring bean classes are defined under a package called com.mycomp.service. What two options are required to enable component scanning? (Choose two.)
Options
- AEnsure bean classes are annotated with the @Component annotation.
- BAdd the @ComponentScan ("com.mycomp. service") to the Java configuration.
- CEnsure bean classes are annotated with the @Autowired annotation.
- DEnsure bean classes are annotated with the @Bean annotation.
- EEnsure bean classes are annotated with the @ComponentScan annotation.
Community Discussion
No community discussion yet for this question.