Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
langxml

<!-- the registry will be scanned and 'mapper' below will be found and installed -->
<bean id="dozerConverterLoader" class="org.apache.camel.converter.dozer.DozerTypeConverterLoader" />
  
<bean id="mapper" class="org.dozer.DozerBeanMapper">
  <property name="mappingFiles">
    <list>
      <value>mapping.xml</value>
    </list>
  </property>
</bean>

Configuring in OSGi blueprint

Available as of Camel 2.12.1

When using Dozer with OSGi Blueprint then its works better by configuring dozer using the org.apache.camel.converter.dozer.DozerBeanMapperConfiguration instead of org.dozer.DozerBeanMapper, as shown below:

Code Block
xml
xml

<!-- the registry will be scanned and 'mapper' below will be found and installed -->
<bean id="dozerConverterLoader" class="org.apache.camel.converter.dozer.DozerTypeConverterLoader" />
  
<bean id="mapper" class="org.apache.camel.converter.dozer.DozerBeanMapperConfiguration">
  <property name="mappingFiles">
    <list>
      <value>mapping.xml</value>
    </list>
  </property>
</bean>

Now, where necessary, Camel will use Dozer to do conversions; In our case between the new domain and legacy Customer types e.g.

...