What is container in spring framework?
-
I was going through this article http://www.vaannila.com/spring/spring-ioc-1.html and here the term container is used. The diagram below shows container. What is container in this article? Is it a piece of
code
or the beanconfig
file? -
Can Spring IOC be used in Spring MVC?
In this context, a container has the meaning of something that provides an infrastructrure needed by some components to live.
You can imagine it this way:
- Like the JVM is a container to run Java Programs,
- A servlet container (i.e. Tomcat) is the thing that runs servlets
- An EJB-Container is the environmet where EJB live (see this wikipedia article (in german, but you can use your browser translator))
The same way Spring is the container where Spring Beans live.