通过Postman模拟Json数据并且在服务器端显示的方法

来源:互联网 发布:jquery ajax json请求 编辑:程序博客网 时间:2024/06/16 19:55

1.

2.


而在服务端直接新建一个controller:

@RestController@RequestMapping("/device")public class DatasPController {    @RequestMapping(value = "/datasp",method = RequestMethod.POST)    public JSONObject handledatas(@RequestBody JSONObject jobj){        System.out.println(jobj.getString("data"));      }}


2 0