当前位置:网站首页>8.3 JSON data interaction - "SSM in depth analysis and project practice"

8.3 JSON data interaction - "SSM in depth analysis and project practice"

2020-11-06 01:14:06 Memory

All the source code in the project can be found in the linked repository :https://github.com/chenhaoxiang/uifuture-ssm

8.3 JSON Data interaction

because JSON The format is simple , Easy to parse , therefore JSON Format data in the interface call , It's very common to pass references from front to back . stay Spring MVC In the middle of JSON Interaction , It mainly needs to use Spring MVC Two notes in (RequestBody and ResponseBody).

8.3.1 Spring MVC in JSON Interactive form

Spring MVC There are two main ways of data interaction with the front end , One is a browser request in the form of a form K-V Structure passes parameters to the back end . The other is the browser through JSON character string (JSON Format string , In essence, it's also K-V structure ) Pass parameters to the back end . The second way is mainly explained here . The front and back-end interaction form diagram is shown in the figure 8-4 Shown .

版权声明
本文为[Memory]所创,转载请带上原文链接,感谢