Hacker News new | ask | show | jobs
by CSDude 3469 days ago
I don't think you can catch errors compile time with all the magic reflection Spring uses, such as resolving services, injected values etc.
2 comments

Agreed that there is lots of magic going on in the DI container but as it resolves everything on startup most issues there are still caught during the development process.

Catching errors at compile time is mostly about avoiding subtle bugs like object.property vs object.propery or adding a parameter to a method and forgetting to update 1 caller

nowdays you don't use xml to define your beans so most of the things are compile checked. granted some things are happening only at runtime which is a whole point of DI :-)