后台接口
@RequestMapping(value = “/updateProcess”, produces = “application/json;charset=utf-8”, method = RequestMethod.POST)
@ResponseBody
public String test(@RequestBody JSONObject jsonObject) {
//获取字符串类型参数
String name= jsonObject.getString(“name”);
//获取数字类型参数
int age = jsonObject.getInteger(“age”);
System.out.println(name + “========” +age);
}

postman测试接口
spring boot后台接收多个json格式参数

相关文章:

  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2021-10-18
猜你喜欢
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2021-10-31
  • 2021-10-10
相关资源
相似解决方案