ExamGecko
Question list
Search
Search

Question 55 - 2V0-72.22 discussion

Report
Export

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

A.
A Spring bean can be explicitly created by annotating methods or fields by @Autowired.
Answers
A.
A Spring bean can be explicitly created by annotating methods or fields by @Autowired.
B.
A Spring bean can be implicitly created by annotating the class with @Component and using the component-scanner to scan its package.
Answers
B.
A Spring bean can be implicitly created by annotating the class with @Component and using the component-scanner to scan its package.
C.
A Spring bean can be implicitly created by annotating the class with @Bean and using the component- scanner to scan its package.
Answers
C.
A Spring bean can be implicitly created by annotating the class with @Bean and using the component- scanner to scan its package.
D.
A Spring bean can be explicitly created using @Bean annotated methods within a Spring configuration class.
Answers
D.
A Spring bean can be explicitly created using @Bean annotated methods within a Spring configuration class.
E.
A Spring bean can be explicitly created by annotating the class with @Autowired.
Answers
E.
A Spring bean can be explicitly created by annotating the class with @Autowired.
Suggested answer: B, E

Explanation:

Reference: https://docs.spring.io/spring-framework/docs/3.0.0.M4/spring-frameworkreference/html/ch03s10.html

https://howtodoinjava.com/spring-core/spring-beans-autowiring-concepts/

asked 16/09/2024
Raed Abu-Haija
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first