3 ms·
I don't think you can catch errors compile time with all the magic reflection Spring uses, such as resolving services, injected values etc.
by CSDude 10y 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.
- cunac 10y agonowdays 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 :-)
- Turbots 10y agoAll the dependency injection and spring setup is done at startup, so you won't have any of those errors during the life cycle of the app. Spring boot with spring data rest makes it so easy to create very strong REST APIs easily. Source: I've done a lot of demos, presentations and trainings on Spring Boot, including at SpringOne in Vegas last summer.
- vbsteven 10y agoAgreed 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