This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit b13202811cd7b6ad8f791ff91e4982b32b610f53 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu May 30 10:17:20 2019 +0200 Regen --- .../modules/ROOT/pages/cbor-dataformat.adoc | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/components/modules/ROOT/pages/cbor-dataformat.adoc b/docs/components/modules/ROOT/pages/cbor-dataformat.adoc index 60a03d6..bf7e263 100644 --- a/docs/components/modules/ROOT/pages/cbor-dataformat.adoc +++ b/docs/components/modules/ROOT/pages/cbor-dataformat.adoc @@ -69,6 +69,32 @@ The component supports 8 options, which are listed below. |=== // spring-boot-auto-configure options: END +#### Using CBOR in Spring DSL + +When using Data Format in Spring DSL you need to +declare the data formats first. This is done in the *DataFormats* XML +tag. + +[source,xml] +----------------------------------------------------------------------------------------------------------------------------- + <dataFormats> + <!-- here we define a CBOR data format with the id test and that it should use the TestPojo as the class type when + doing unmarshal. --> + <cbor id="test" unmarshalTypeName="org.apache.camel.component.cbor.TestPojo"/> + </dataFormats> +----------------------------------------------------------------------------------------------------------------------------- + +And then you can refer to this id in the route: + +[source,xml] +------------------------------------- + <route> + <from uri="direct:back"/> + <unmarshal><custom ref="test"/></unmarshal> + <to uri="mock:reverse"/> + </route> +------------------------------------- + ### Dependencies [source,java]