I am using declaring some REST routes, one of which is as below:
<put id="rest:award.linkfaq" uri="/award/faq" produces="application/json"
consumes="application/json" type="com.foo.bar.FaqLink">
FaqLink
is just a POJO with getter and setters for id
, awardId
and so on. I am also subsequently routing to a mybatis query as so:
<to uri="mybatis:linkFaq?statementType=SelectList&inputHeader=${in.body}"
id="linkFaq.mybatis:linkFaq" />
In the SqlMapper, even though I have declared the ParamType
as FaqLink
(after declaration as a TypeAlias
), the variables used as part of the query such as #{id}
, #{awardId}
still resolve to null.
What am I doing incorrectly that I am unable to get the SqlMapper to get the variables from the said POJO? I logged ${in.body}
and it seems to be an instance of FaqLink