spring mvc

~坤~ / 2023-06-08 / 原文

spring mvc接收json格式字符串

@PostMapping("jsonhello")
public String jsonhello(@RequestBody Map<String,Object> map){
    System.out.println(JSONObject.toJSONString(map));
    return "SUCCESS";
}

apipost请求

wireshark