[英]How do I send a POST request using Postman for a composite key
How do I send a POST request using Postman for a composite key?如何使用 Postman 为复合键发送 POST 请求? my composite key is:"favoritePK" which contains "id_ad" and "id_customer".我的复合键是:“favoritePK”,其中包含“id_ad”和“id_customer”。 i need your help我需要你的帮助
I think there is no problem in your code.我认为您的代码没有问题。 Your entity must contain both the fields id_ad, id_customer.您的实体必须同时包含 id_ad、id_customer 字段。 Just send any request with both fields like:只需发送包含两个字段的任何请求,例如:
{
id_ad: 1,
id_customer:2,
"name": "Someone Singh",
"bio": "Testing",
"dob": "1998-02-01"
}
And at the receiving end use @RequestBody with entity.并在接收端使用 @RequestBody 和实体。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.