要 创建 书(编号:1)之间的关系和类别(ID:1):
- 提出要求
- 媒体类型:文本/ uri-list,
- 数据:http:// localhost:8080 / categories / 1
- 请求到http:// localhost:8080 / books / 1 / category
卷曲示例:
curl -X PUT -H "Content-Type: text/uri-list" -d "http://localhost:8080/categories/1" http://localhost:8080/books/1/category
要 删除 此关系,只需对同一地址执行删除请求
卷曲示例:
curl -X DELETE http://localhost:8080/books/1/category
还要回答您的第二个问题:您的配置看起来不错,并且我已经在您的代码上测试了此示例。



