Better HN
topnewbestaskshowjobs
Log inSign up

throwaway242359

4 karma · joined Jan 7, 2023 (3y ago) · 1 submissions

Submissions

comment 3y ago · link · parent

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.