camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qwertywx <qwert...@hotmail.com>
Subject Camel Rest DSL is not recognizing JsonProperty access
Date Fri, 10 Feb 2017 13:23:29 GMT
I am using Camel Rest DSL to build my rest service but it seems that , it
does not recognize JsonProperty annotation. 

I have a propery like: 

class Test { 

    private int id; 

    @JsonProperty(access = Access.READ_ONLY) 
    private String text; 
} 
and the rest definition is: 

<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>
When I call it with : 

{ 
    "id":2, 
    "text":"asd" 
} 
Text field is also getting initialized. 

What am I missing? 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Rest-DSL-is-not-recognizing-JsonProperty-access-tp5793764.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message