Dozer
Since Camel Quarkus1.0.0-M1 JVMsupported Nativesupported
Map between Java beans using the Dozer mapping library.
What’s inside
-
Dozer component, URI syntax:
dozer:name
Please refer to the above link for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-dozer</artifactId>
</dependency>
Check the User guide for more information about writing Camel Quarkus applications.
Additional Camel Quarkus configuration
The Dozer extension can automatically register a DozerBeanMapperConfiguration
bean with the Camel registry which references your mapping files.
Use the following configuration property to specify the location(s) of your Dozer mapping configuration files.
quarkus.camel.dozer.mapping-files = dozerMappings.xml,file:foo/bar/custom-mappings.xml,http://foo/bar/mapping.xml
The Dozer extension provides a type converter which can leverage your mapping configuration(s) to convert and map a message body from one type to another. For example.
from("direct:oldCustomerTypeIn").convertBodyTo(NewCustomerType.class);
It is disabled by default but can be enabled with the following configuration property.
quarkus.camel.dozer.type-converter-enabled = true
Configuration property | Type | Default |
---|---|---|
A comma separated list of Dozer XML mapping configuration file URIs. |
|
|
Sets whether to configure the DozerTypeConverter for the CamelContext |
|
|
Configuration property fixed at build time. All other configuration properties are overridable at runtime.