title: Dozer and Spring integration
body: <p>EDIT : A new lib has been introduced which clarify the thing for new versions</p>
  
  <blockquote>
    <p>Since version 5.5.0 Spring integration comes within additional module
    dozer-spring.</p>
  </blockquote>
  
  <hr>
  
  <p>Hi there I'm relatively new to Dozer and Spring  and a bit confused about how to put that in place.</p>
  
  <p>From the dozer website : <a href="http://dozer.sourceforge.net/documentation/usage.html" rel="nofollow">http://dozer.sourceforge.net/documentation/usage.html</a></p>
  
  <blockquote>
    <p><strong>Spring integration</strong>
    ...</p>
  </blockquote>
  
  <pre><code>&lt;bean id="mapper" class="org.dozer.DozerBeanMapper"&gt;
    &lt;property name="mappingFiles"&gt;
      &lt;list&gt;
        &lt;value&gt;dozer-global-configuration.xml&lt;/value&gt;            
        &lt;value&gt;dozer-bean-mappings.xml&lt;/value&gt;
        &lt;value&gt;more-dozer-bean-mappings.xml&lt;/value&gt;
      &lt;/list&gt;
    &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Now from <a href="http://dozer.sourceforge.net/documentation/springintegration.html" rel="nofollow">http://dozer.sourceforge.net/documentation/springintegration.html</a> :</p>
  
  <pre><code>&lt;bean class="org.dozer.spring.DozerBeanMapperFactoryBean"&gt;
      &lt;property name="mappingFiles" value="classpath*:/*mapping.xml"/&gt;
      &lt;property name="customConverters"&gt;
          &lt;list&gt;
              &lt;bean class="org.dozer.converters.CustomConverter"/&gt;      
          &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="eventListeners"&gt;
          &lt;list&gt;
              &lt;bean class="org.dozer.listeners.EventListener"/&gt;
          &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="factories"&gt;
          &lt;map&gt;
              &lt;entry key="id" value-ref="bean-factory-ref"/&gt;
          &lt;/map&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>So I'm not really sure which way I should use it. My objectives is to have a mapper object in my business classes that will convert <code>Business Objects</code> to <code>DTO</code> (and reversely).
  So I think it just should be a basic Dependency Injection ?</p>
  
  <p>Thanks for any help.</p>