Spring Workflow

 

 

 

Spring workflow description

      1. The user sends a request to the server, and the request is captured by the Spring front-end control Servelt DispatcherServlet;

      2. The DispatcherServlet parses the request URL and obtains the request resource identifier (URI). Then according to the URI, call HandlerMapping to obtain all related objects configured by the Handler (including the Handler object and the interceptor corresponding to the Handler object), and finally return it in the form of a HandlerExecutionChain object;

      3. DispatcherServlet selects a suitable HandlerAdapter according to the obtained Handler. (Note: If the HandlerAdapter is successfully obtained, the preHandler(...) method of the interceptor will be executed at this time)

       4. Extract the model data in the Request, fill in the Handler input parameters, and start executing the Handler (Controller). In the process of filling in the Handler's parameters, according to your configuration, Spring will do some additional work for you:

      HttpMessageConveter: Convert the request message (such as Json, xml and other data) into an object, and convert the object into the specified response information

      Data transformation: perform data transformation on the request message. Such as String conversion to Integer, Double, etc.

      Data Root Formatting: Format the data of the request message. Such as converting strings to formatted numbers or formatted dates, etc.

      Data verification: Verify the validity of the data (length, format, etc.), and store the verification result in BindingResult or Error

      5. After the Handler is executed, it returns a ModelAndView object to the DispatcherServlet;

      6. According to the returned ModelAndView, select a suitable ViewResolver (must be the ViewResolver registered in the Spring container) and return it to DispatcherServlet;

      7. ViewResolver combines Model and View to render views

      8. Return the rendering result to the client.

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326286952&siteId=291194637