What do you mean by dependency injection and how does it work?



What do you mean by dependency injection and how does it work?..

Answer / Anuj Kumar Tripathi

Dependency Injection is a design pattern that allows dependencies to be injected or passed to an object at runtime, rather than hard-coding them. It reduces the need for objects to query other objects for dependencies, which can improve modularity, testability, and reusability.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

What type of transaction management spring support?

1 Answers  


What is binding in spring and tell us about the @autowired annotation?

1 Answers  


In spring, what is weaving?

1 Answers  


What is repository annotation in spring?

1 Answers  


What are the different types of spring?

1 Answers  


What does @controller do in spring?

1 Answers  


Which is better setter or constructor injection?

1 Answers  


Explain dependency injection and its types?

1 Answers  


How is localization achieved in the spring mvc web applications?

1 Answers  


What are the types of annotations?

1 Answers  


What is @componentscan in spring?

1 Answers  


Explain the concept of a beanfactory?

1 Answers  


Categories