I am using Spring MVC for my web application. My beans are written in \"spring-servlet.xml
\" file
Now I have a class MyClass
and i want to
Another way is to inject applicationContext through servlet.
This is an example of how to inject dependencies when using Spring web services.
my-soap-ws
org.springframework.ws.transport.http.MessageDispatcherServlet
transformWsdlLocations
false
contextConfigLocation
classpath:my-applicationContext.xml
5
Alternate way is to add application Context in your web.xml as shown below
contextConfigLocation
/WEB-INF/classes/my-another-applicationContext.xml
classpath:my-second-context.xml
Basically you are trying to tell servlet that it should look for beans defined in these context files.