为所有反序列化注册一个模块

为所有反序列化注册一个模块

本文介绍了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>)

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

09-02 10:31