官术网_书友最值得收藏!

  • Spring MVC Blueprints
  • Sherwin John Calleja Tragura
  • 224字
  • 2021-07-14 10:48:24

Overview of the Spring MVC specification

The Spring MVC framework derives its specification from the Model-View-Controller (MVC) design pattern that separates the application into layers such as business, logic, navigation and presentation. The principle behind this design pattern is to create a de-coupled or loosely-coupled architecture, which is more flexible than the tightly-coupled frameworks.

Technically, Spring MVC works starts with a DispatcherServlet that dispatches requests to handlers, with configurable handler mappings, view resolution, locale, time zone and theme resolution, as well as support for uploading files. The default handler is based on the @Controller and @RequestMapping annotations, offering a wide range of flexible handling methods. With the introduction of Spring 3.0, the @Controller mechanism also allows you to create RESTful Web sites and applications, through the @PathVariable annotation and other features (http://docs.spring.io/).

The following diagram depicts how DispatcherServlet manages the whole MVC framework while, at the same time, avoiding the Fat Controller syndrome.

The org.springframework.web.servlet.DispatcherServlet is an actual servlet in the web.xml file of your web application, declared using the standard servlet tags. Just like any typical servlets, it recognizes request transactions through URL mappings. This servlet serves as the front controller of the whole MVC project.

Since this PWP project is written using the Spring Framework 4.x specification, the implementations always starts by declaring the DispatcherServlet.

主站蜘蛛池模板: 永州市| 嘉兴市| 太和县| 定南县| 临漳县| 咸宁市| 广河县| 浮梁县| 平潭县| 天柱县| 丰镇市| 宣恩县| 米易县| 永寿县| 香港| 宜宾市| 桐庐县| 六枝特区| 靖边县| 图木舒克市| 满城县| 图们市| 石台县| 申扎县| 普兰县| 屏山县| 岑巩县| 远安县| 溧阳市| 大田县| 辛集市| 雷波县| 浮梁县| 汉沽区| 眉山市| 泗洪县| 伊宁县| 贵港市| 日土县| 河南省| 平谷区|