Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从邮递员处为自定义VO发送JSON_Json_Spring_Get_Postman_Spring Restcontroller - Fatal编程技术网

如何从邮递员处为自定义VO发送JSON

如何从邮递员处为自定义VO发送JSON,json,spring,get,postman,spring-restcontroller,Json,Spring,Get,Postman,Spring Restcontroller,我应该从Postman发送什么格式的JSON,以便将其正确映射到我的rest控制器 TfundsVO : BigDecimal accountNum String accountName BigDecimal accountBal @GetMapping("/") public ResponseEntity<Object> getFunds(@RequestBody TfundsVO tfundsVO) { System.out.println(tfundsVO.get

我应该从Postman发送什么格式的JSON,以便将其正确映射到我的rest控制器

TfundsVO :
BigDecimal accountNum
String accountName
BigDecimal accountBal



@GetMapping("/")
public ResponseEntity<Object> getFunds(@RequestBody TfundsVO tfundsVO) {
    System.out.println(tfundsVO.getAccountNum());
}

当我从Postman尝试上面的JSON时,调用了getFunds方法,但是TfundsVO中的所有值都是空的。

只发送不带数组的有效负载

{ "account name": "test" }
请添加一个application/json头作为内容类型

{ "account name": "test" }