spring mvc -- HttpMessageConverter、DispatcherServlet、Validator---@RequestBody @respondBody
2023-09-11 14:18:43 时间
When RESTful Web Service is developed using Spring MVC, the application is configured as given below. Among these, implementation is necessary for the portion marked with red frame.
Sr. No. Process layer Description (1) Spring MVC(Framework) Spring MVC receives a request from client and determines the REST API (handler method of Controller) to be called. (2) Spring MVC converts the JSON format message specified in request BODY to Resource object by usingHttpMessageConverter
. (3) Spring MVC performs input validation for the value stored in Resource object usingValidator
. (4) Spring MVC calls REST API.Here, the Resource that has been converted from JSON and for which input validation is carried out, is delivered to REST API. (5) REST API REST API calls Service method and performs the process for DomainObject such as Entity etc. (6) Service method calls the Repository method and performs CRUD process for the DomainObject such as Entity etc. (7) Spring MVC(Framework) Spring MVC converts the Resource object returned from REST API to JSON format message, by usingHttpMessageConverter
. (8) Spring MVC sets JSON format message in response BODY and responds to client.
http://terasolunaorg.github.io/guideline/5.2.0.RELEASE/en/ArchitectureInDetail/WebServiceDetail/REST.html
相关文章
- Spring MVC 1
- 一个简单的Spring MVC的例子
- ssm(Spring+Spring mvc+mybatis)Dao层实现类——DeptDaoImpl
- ssh(Spring+Spring mvc+hibernate)——saveEmp.jsp
- ssh(Spring+Spring mvc+hibernate)——EmpController
- Spring MVC:控制器类名称处理映射
- 史上最强Spring mvc入门
- Spring Cloud Alibaba 2.2.8 版本发布与社区未来规划介绍
- 20-spring学习-Spring MVC基本操作
- 关于spring mvc Controller的几个注解
- [Kotlin Spring boot] Connect template with a backing bean
- Spring Boot——2分钟构建spring web mvc REST风格HelloWorld
- spring boot:使用validator做接口的参数、表单、类中多字段的参数验证(spring boot 2.3.1)
- 请谈一下Spring MVC的工作原理是怎样的?
- Spring MVC--接收JSON格式的数据
- spring boot日志框架体系剖析(默认采用logback作为日志框架)
- Spring MVC在参数绑定前通过Filter过滤器改变请求参数的值
- Spring MVC入门示例教程--静态页面跳转
- Spring实战6-利用Spring和JDBC访问数据库
- Dubbo和Spring Cloud微服务架构比较
- Spring读源码系列之AOP--06---AopProxy===>spring使用jdk和cglib生成代理对象的终极奥义
- Spring MVC注解版本--初识--12
- Spring MVC各组件近距离接触--中--03
- Spring读源码系列番外篇09--BeanWrapper的应用
- 【Spring笔记03】Spring依赖注入各种数据类型
- 002-MVC架构,贫血的领域模型、spring mvc,webhars使用
- Spring MVC表单处理
- Spring MVC文本框
- Spring MVC使用SimpleMappingExceptionResolver类异常处理