Camel + Jackson:为所有反序列化注册一个模块 [英] Camel + Jackson : Register a module for all deserialization

查看:43
本文介绍了Camel + Jackson:为所有反序列化注册一个模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用 Camel,消息以 JSON 的形式进入路由.我使用 JACKSON 作为我的解串器.我有一个案例,我需要一个自定义序列化器/反序列化器来处理我的一条消息.

I'm using Camel for my application, and messages come in to routes as JSON. I use JACKSON as my deserializer. I have a case where I require a custom serializer/deserializer to handle one of my messages.

我想做的是为键注册自定义序列化器/解串器.在 Camel 中,如何确保在我的路线中编组/解组时序列化器/解串器可用?

What I want to do is register the custom serializer/deserializer for keys. In Camel, how do I make sure that the serializer/deserializer is available for whenever I marshall/unmarshall in my routes?

推荐答案

您可以使用

.unmarshal(<dataFormatComponent>)

http://camel.apache.org/data-format.html

http://camel.apache.org/json.html

这篇关于Camel + Jackson:为所有反序列化注册一个模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆