Broadcom-VMware
2V0-72.22PSE · Question #83
Spring bean classes are defined under a package called com.mycomp.service. What two options are required to enable component scanning? (Choose two.)
Sign in or unlock 2V0-72.22PSE to reveal the answer and full explanation for question #83. The question stem and answer options stay visible for context.
Core Spring
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.
Unlock 2V0-72.22PSE to see the answer
You've previewed enough free 2V0-72.22PSE questions. Unlock 2V0-72.22PSE for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#Component Scanning#@Component#@ComponentScan#Spring Configuration