在 post 请求中发送 DTO

Sending a DTO in a post request

以下代码通过 post 向我的数据库添加了一个数据集。 table 有一个名为 customer 的外键,由 DTO 表示。 我正在使用 post man 发送 post 但是我不确定如何将 dto 输入到 post man 中。大家知道怎么做吗?

代替@RequestParam,使用@RequestBody:

@RequestBody CustomerDTO customer

编辑:你应该在正文中传递什么:

{ "id": 13, "name": "Steve", "nmcAcctNo": 13165464, "hubId": 235445, "createTime": 1536382800000, "updateTime": 1536382800000 }