2 ms·
This is how I cope with Java DI. I write my classes with one constructor that takes anything I need as final private members. This has the benefit of working
by throwaway242359 4y ago
This is how I cope with Java DI.
I write my classes with one constructor that takes anything I need as final private members.
This has the benefit of working with any DI framework without any annotations or other hacks.
It also has the benefit of being usable or callable without using a DI framework.