This article mainly introduces the relevant knowledge of springmvc to implement json interaction-requestBody and responseBody. Has very good reference value. Let's take a look at json data interaction with the editor. 1. Why json data interaction is necessary. The json data format is more commonly used in interface calls and html pages. The json format is relatively simple and easy to parse. For example: webservice interface, transmit json data. 2. springmvc for json interaction (1) request json, output json, the request is a json string, so the requested content needs to be converted into json in the front-end page, which is not convenient. (2) Request key/value and output json. This method is more commonly used. 3. Environment preparation 3.1 Load the JSON-converted jar package. Use the jackson package in springmvc for json conversion (@requestBody and @responseBody use the following package for json conversion), as follows: jackson-core-asl-1.9.11.jar
1. springmvc implements json interaction-requestBody and responseBody (picture and text)
Introduction: This article mainly introduces the relevant knowledge of springmvc to implement json interaction-requestBody and responseBody. Has very good reference value. Let’s take a look with the editor
2. hibernate3-SpringMVC+hibernate4+Extjs4.2+mysql
Introduction: ---------- 1. Background processing of database data (reading data) @RequestMapping("/getmanagers") @ResponseBody public Map getWorkOrders(String page,String limit,String start,String all ){ int pageInt = Integer.parseInt(page); int limitInt = Integer.parseInt(limit); int start
3. SpringMVC restful annotation @RequestBody performs json and object conversion_javascript skills
Introduction: This article mainly introduces the SpringMVC restful annotation @RequestBody related information for json and object conversion, friends in need can refer to it
[Related Q&A recommendations]:
java - SpringMVC@ ResponseBody Chinese garbled code
java - spring Can the return type be determined within the method
java - spring responsebody returns Chinese garbled code
java - Spring boot How to get the value of Attribute in request through annotation
The above is the detailed content of Recommendations about responseBody. For more information, please follow other related articles on the PHP Chinese website!