0
我正在使用Camel Rest DSL構建我的休息服務,但似乎它不識別JsonProperty註釋。Camel Rest DSL無法識別JsonProperty訪問
我有這樣一個屬性格式:
class Test {
private int id;
@JsonProperty(access = Access.READ_ONLY)
private String text;
}
,其餘的定義是:
<rests xmlns="http://camel.apache.org/schema/spring">
<rest consumes="application/json" produces="application/json" path="/api/v1">
<post bindingMode="json" type="Test" uri="/path">
<route>
.....
</route>
</post>
</rest>
</rests>
當我把它用:
{
"id":2,
"text":"asd"
}
文本字段也越來越初始化。
我缺少什麼?
THX