by oftenwrong · 5y ago · 0 comments
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.
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.