InterviewSolution
| 1. |
What Are The Different Types Of Ioc (dependency Injection)? |
|
Answer» Types of IoC are: Constructor-based dependency INJECTION: Constructor-based DI is accomplished when the container INVOKES a class constructor with a NUMBER of arguments, each representing a dependency on other class. Setter-based dependency injection: Setter-based DI is accomplished by the container CALLING setter methods on your BEANS after invoking a no-argument constructor or no-argument static factory method to instantiate your bean. Types of IoC are: Constructor-based dependency injection: Constructor-based DI is accomplished when the container invokes a class constructor with a number of arguments, each representing a dependency on other class. Setter-based dependency injection: Setter-based DI is accomplished by the container calling setter methods on your beans after invoking a no-argument constructor or no-argument static factory method to instantiate your bean. |
|