Question: How do you inject a dependency into a Spring bean?

  1. any of these answers
  2. Annotate a Setter method with the @Autowired annotation.
  3. Specify parameters in the constructor with an optional @Autowired annotation.
  4. Use field injection.

Answer: The correct answer of the above question is Option A:any of these answers