Hacker News new | ask | show | jobs
by HiIAmIlNano 1366 days ago
The author is using field injection and claiming that the field cannot be private. As far as I know he should be using constructor dependency injection and make the field private and final. That way is also easier to write unit tests and maybe make use of interfaces in case he wants to avoid using a mocking framework.

Not only that but if I recall correctly quarkus resolves dependencies and config files at compile time and not at runtime using reflection as spring does.

1 comments

The author sadly just doesn’t know what he’s doing.
Then this is clearly a library UX problem. Him not understanding what he's doing is the point!