Tomcat running processes under spring architecture

1.Tomcat startup phase:
1.1 war package loaded, the corresponding call web.xml file, corresponding to the DispatcherServlet call, do the following:
   Create ioc container: Map iocMap = new HashMap () ;
    scan package: @ package includes scanning war Controller, @ Service class etc. annotation;
    instantiated: a scanned class is instantiated by reflection, and stored in iocMap;
    dependency injection: the injection bean dependency of instantiated objects;
    urlMapping: http request and establishing Method mapping relationship of correspondence.

After a successful start operating phase 2.Tomcat
2.1 the browser sends a http request: in Http: // ip: port / proJectName / actionName.do format transmission request;
2.2.Tomcat DispatcherServlet the call doGet / doPost method to do the following:
   From Method UrlMapping find corresponding to the object;
   call Method object
   returned in response to the result

Guess you like

Origin blog.csdn.net/qq_38331606/article/details/91973491