Constructor Dependency Injection with Array of Object Or Non string

In some scenarios, we may need to inject an array of custom object to an object. Consider the example where Person has multiple Addresses In this case, we can use Array of Address which stores the addresses Let us see the same in spring through Constructor Dependency Injection Create a class called Person It contains […]

Share this article on

Setter Dependency Injection

As we all know by this time that , there are 2 types of DI in Spring based on how we inject the dependent beans They are as below 1) Constructor DI 2) Setter DI We have already learned about Constructor DI, now we will see Setter DI. Setter DI is the method of injecting […]

Share this article on
< Previous Next >