Skip to content
Sharp

Spring Core · interview question

Which Spring annotation is used to automatically wire a bean into another?

Multiple choiceEasychapter-9-curatedpremiumspring-coretransactions-and-proxies
Choose one answer
Answer and explanation

Correct answer

D. @Autowired

Why

The @Autowired annotation is used to automatically inject a bean into another bean, indicating to Spring that it should resolve the dependency automatically.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →