getBean()
to retrieve instances of your beans. ... Indeed, your application code should have no calls to the
getBean()
method at all, and thus no dependency on Spring APIs at all."So why is it then, that all examples use
getBean()
?It is simply impossible to inject Spring beans without depending on Spring APIs.
Keine Kommentare:
Kommentar veröffentlichen