Dependency injection has seen its day. The gains promised by DI/IoC containers tend to be outweighed by the complexity they introduce.
I'm looking at you, Spring.
I'm looking at you, Spring.
Most DI frameworks automatically configure, and register objects. So literally all you need to add is the annotation.
Then you can override the automatic registration with you own, with different implementation when required.