- Spring 5.0 By Example
- Claudio Eduardo de Oliveira
- 424字
- 2021-06-24 19:17:25
Spring Web MVC
This module is the first one built by the Spring Team to support the web applications in Spring Framework. This module uses the Servlet API as its foundation, and then these web applications must follow the Servlet Specification and be deployed into servlet containers. In version 5.0, the Spring Team created a Reactive web framework, which will be covered later in this book.
The Spring Web MVC module was developed using the front controller pattern. When the framework was created, this pattern was a common choice for many frameworks, such as Struts and JSF, among others. Under the hood, there is the main servlet in Spring called DispatcherServlet. This servlet will redirect through an algorithm to do the desired work.
It enables developers to create amazing web applications on the Java platform. This portion of the framework provides full support to develop this kind of application. There are some interesting features for this purpose, such as support for internationalization and support for handling cookies. Also, multipart requests are an exciting feature for when the application needs to handle upload files and support routing requests.
These characteristics are common for most web applications, and the framework has excellent support for these features. This support makes the framework a good choice for this kind of application. In Chapter 2, Starting in the Spring World - The CMS Application, we will create an application using this module and the main features will be explored in depth.
The module has full support for annotation programming since to declare HTTP endpoints until to wrap the request attribute in an HTTP request. It makes the application extremely readable without the boilerplate code to get the request parameter, for example.
Web application-wise, it enables developers to work with robust template engines such as Thymeleaf and Freemarker. It is entirely integrated with routing features and bean validation.
Also, the framework allows developers to build REST APIs with this module. Given all of this support, the module has become a favorite in the Spring ecosystem. Developers have started to create APIs with this stack, and some important companies have started to use it, especially given that the framework provides an easy way to navigate through the annotations. Because of this, the Spring Team added the new annotation @RestController in version 4.0.
We will work a lot with this module. Chapter by chapter, we will learn interesting things about this part of the framework.
- 數(shù)據(jù)科學(xué)實戰(zhàn)手冊(R+Python)
- Monkey Game Development:Beginner's Guide
- Java系統(tǒng)分析與架構(gòu)設(shè)計
- R語言編程指南
- 信息安全技術(shù)
- MySQL數(shù)據(jù)庫管理與開發(fā)實踐教程 (清華電腦學(xué)堂)
- jQuery開發(fā)基礎(chǔ)教程
- 零基礎(chǔ)學(xué)Python網(wǎng)絡(luò)爬蟲案例實戰(zhàn)全流程詳解(入門與提高篇)
- Apache Kafka Quick Start Guide
- Visual FoxPro程序設(shè)計習(xí)題集及實驗指導(dǎo)(第四版)
- 平面設(shè)計經(jīng)典案例教程:CorelDRAW X6
- Everyday Data Structures
- 從Excel到Python數(shù)據(jù)分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應(yīng)用
- C#程序設(shè)計基礎(chǔ)入門教程
- Learning ECMAScript 6