While experimenting with this collection issue in Spring.NET, I discovered that Spring can inject dependency using a private setter. I have two questions:
- Is it documented anywhere?
- Is private setter recommended?
The documentation says:
Setter-based DI is implemented by calling setter methods on your objects ...
Of course, he doesn’t explicitly talk about public configuration methods, but this is what I always assumed. I am using version 1.0.2 on .NET 3.5.
source
share