Is the following code in my Struts action where I am retrieving a Spring bean an example of Dependency Injection?
If so then which of the 3 categories does it fall into? Interface, constructor, or setter injection?
Thanks for any help,
Jehan
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12612
posted
0
I'm not sure *why* you'd do it this way, but this particular code snippet isn't really dependency injection, since you're retrieving the bean manually.
Now, the "beanName" property might fall into one of those categories (well, at least constructor (unlikely) or setter (most likely)) but we can't tell.
subject: Is this an example of Dependency Injection?