I’m really not sure where to start with this because I am extremely new at Spring.
Currently I am instantiating a class like normal,
ClassImpl newImpl = new ClassImpl();
I want to do this through Spring’s context.xml – so I’ve loaded the class as a bean-
<bean id="ClassId" class="ClassImpl"></bean>
How do I know instantiate ClassImpl by taking advantage of the fact that I have passed it in as a bean? That is, how do I give newImpl a new ClassImpl by making Spring inject it in?
You’d do something like:
If you’re loading it from a context.xml outside your project, I believe you can do