Exam 2v0-7222 All QuestionsBrowse all questions from this exam
Question 55

Which two statements are true regarding bean creation? (Choose two.)

    Correct Answer: B, D

    A Spring bean can be implicitly created by annotating the class with @Component and using the component-scanner to scan its package. A Spring bean can also be explicitly created using @Bean annotated methods within a Spring configuration class. @Autowired is not used for bean creation, but for dependency injection, and @Component works with component-scanning while @Bean is used within configuration classes.

Discussion
Tolo01Options: BD

B and D

rhuancaOptions: BD

why not B and D ? @Autowired is used for dependency injection so E from my point of view is not correct