apache camel and jackson

前端 未结 1 528
南笙
南笙 2021-01-02 17:07

I\'m trying out apache-camel, and I\'ve set up a basic route that calls an http service via http4 component, transforms the result via unmarshal().json(JsonLibrary.Jackson),

相关标签:
1条回答
  • 2021-01-02 17:40

    Found the answer, posting in case anyone else runs into this. The route builder should be setup like:

    from("direct:start").to("http4://...").unmarshal().json(JsonLibrary.Jackson,com.xxx.Response)
    .to("bean:com.xxx.MyResponseEchoer")
    

    I.e. pass the class type to the json method.

    0 讨论(0)
提交回复
热议问题