Spring MVC is a framework built on top of the Servlet API. As such, it requires a Servlet container.
Your Servlet container finds the web.xml
or uses any other deployment strategy (depends on container), finds the Servlet
implementations to instantiate (or through @WebServlet
) and instantiates them.
One of these Servlet
implementations is Spring's DispatcherServlet
which, as part of its initialization, generates an ApplicationContext
which it then uses to configure its controllers and dispatch requests.