Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Spring Data Rest 构建一个应用程序。我有一个由不可为空的外键支持的多对一关系。使用 REST API 在关系的“多”端添加元素的正确方法是什么?
这碰巧起作用了:
POST http://server:8080/context/manyEntity {"manyId":"manyIdValue","manyAttribute1":"manyAttribute1Value",...,"oneEntity":{"oneId":"oneIdValue"}}