Spring Boot Based Online Shopping Web Application
CHAPTER 1 INTRODUCTION OF TOOLS
Download 1.69 Mb. Pdf ko'rish
|
WeiTianyu Project2022
- Bu sahifa navigatsiya:
- 1.2 Spring MVC Model
CHAPTER 1 INTRODUCTION OF TOOLS
1.1 Spring Framework The Spring Framework is an application framework and the first version was written by Rod Johnson, who released the framework with his book “Expert One-to-One J2EE Design and development” in October 2002. Even if the initial version of the Spring framework was released about 20 years ago, it is still one of the most popular application development frameworks used by java developers. It currently consists of a large number of modules providing a range of services. Many developers and techniques focus on the Spring consulting, supporting, and training. New versions are released every year. The following figure 1 shows you the history of the Spring. Figure 1 Version table of the Spring 1.2 Spring MVC Model A Spring MVC is a Java framework which is used to build web App. It follows the Model-View-Controller design pattern. It implements all the basic features of a core spring framework like Inversion of Control, Dependency Injection.[1] As we know, “Model-” contains the data of application, and each single data can be an object or a collection of objects. “View-” represents information in a particular format such as JSP file or HTML file. “Controller-” contains business logic of application and different controllers will be used for different requests. Spring MVC model comprises six components as follows: 1 ● DispatcherServlet: It receives the request that clients send and transferred to it by Web.xml file ● Handler Mapping: Whenever Dispatcher Servlet receives incoming requests, it will map the requests to different individual controllers with help of Handler Mapping. In Spring Boot, we use annotation @RequestMapping instead of Handler Mapping. ● Controller: It handles the incoming requests and responses to an action that the user does. ● Model and View: After controllers handle its particular requests and the Model and View associate with the particular request and return the name of view back to DispatcherServlet. ● View Resolver: It resolves the view based on output given by Model and View and selects the media. [1] ● View: it is a way of representing the output to end clients. Figure 2 Spring MVC working flow Download 1.69 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling