DEV Community

How do you get a Spring Bean without Dependency Injection?

Simon Martinelli on January 08, 2024

ApplicationContextAware to the Rescue! The Spring Framework provides an interface called ApplicationContextAware. From the JavaDoc: “Int...
Collapse
 
erikpischel profile image
Erik Pischel

We use that to "springify" a larger code base with java classes that are not spring beans yet but uses other spring beans