Hi there.
I am kind of new to setting up Spring and I'd like to use Spring IOC to retrieve an implementation of a class.
The interface is Facade and the implementing class is FacadeImpl. Normally you would do Facade facade = new FacadeImpl() obviously.
My spring config file is called
spring-config.xml, it's in my project's WEB-INF folder and it looks like this:
I have already figured out how to get an implementation using Spring IOC in a stand-alone
JUnit test class, which is also in the web-project.
I used this code, which works fine:
My big question is, how to retrieve an instance of this facade in the code that is running in a container. I know I have to use something like:
But when I run it, it says:
Thanks!
Kjeld