【发布时间】:2016-12-08 16:22:38
【问题描述】:
我有两个实体:
class User {
@DbRef
private Form form;
}
class Form {
}
以及它们的 REST 存储库 @RepositoryRestResource。
我想创建新的 User 资源,所以我正在使用下一个 json 进行 POST 请求:
{
"form":"/forms/123"
}
其中"/forms/123" 是资源引用。但它不起作用。
它说"Could not read document: Can not construct instance of User: no String-argument constructor/factory method to deserialize from String value"
我应该启用一些东西来使它工作吗?
【问题讨论】: