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