Re:A categorized list of all Java and JVM features since JDK...
by avmich on Friday April 02, 2021 @02:32PM
(#26674351)
> It's reasonable to provide a single implementation of an interface, if the goal is to facilitate dependency injection for that component.
You don't really need dependency injection if there is only single choice of what to inject. You can just refer in code to the only possible component.
https://wiki.c2.com/?RavioliCode
DI is a powerful concept, but Spring projects rely on DI in such a generic way that it often doesn't even make sense for your application. You have to gain intimate knowledge of the abstractions, and inject a bunch of code in a bunch of places just to make it do the very-straightforward thing you were trying to do.