Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8868375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:15:33+00:00 2026-06-14T17:15:33+00:00

EDIT : A new lib has been introduced which clarify the thing for new

  • 0

EDIT : A new lib has been introduced which clarify the thing for new versions

Since version 5.5.0 Spring integration comes within additional module
dozer-spring.


Hi there I’m relatively new to Dozer and Spring and a bit confused about how to put that in place.

From the dozer website : http://dozer.sourceforge.net/documentation/usage.html

Spring integration
…

<bean id="mapper" class="org.dozer.DozerBeanMapper">
  <property name="mappingFiles">
    <list>
      <value>dozer-global-configuration.xml</value>            
      <value>dozer-bean-mappings.xml</value>
      <value>more-dozer-bean-mappings.xml</value>
    </list>
  </property>
</bean>

Now from http://dozer.sourceforge.net/documentation/springintegration.html :

<bean class="org.dozer.spring.DozerBeanMapperFactoryBean">
    <property name="mappingFiles" value="classpath*:/*mapping.xml"/>
    <property name="customConverters">
        <list>
            <bean class="org.dozer.converters.CustomConverter"/>      
        </list>
    </property>
    <property name="eventListeners">
        <list>
            <bean class="org.dozer.listeners.EventListener"/>
        </list>
    </property>
    <property name="factories">
        <map>
            <entry key="id" value-ref="bean-factory-ref"/>
        </map>
    </property>
</bean>

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 Business Objects to DTO (and reversely).
So I think it just should be a basic Dependency Injection ?

Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:15:35+00:00Added an answer on June 14, 2026 at 5:15 pm

    Both are valid approaches, just inject this mapper as a dependency in the service class responsible for mapping, eg:

    @Service
    public class MyMappingService{
     @Autowired DozerBeanMapper dozerBeanMapper;
    }
    

    With DozerBeanMapperFactoryBean the approach along these lines should work:

    <bean class="org.dozer.spring.DozerBeanMapperFactoryBean">
    ....
    </bean>
    

    This returns a mapper instance, so just inject in a mapper type this way:

    @Service
    public class MyMappingService{
     @Autowired Mapper dozerBeanMapper;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

edit/operacoes.php header('Content-Type: application/json'); include('../../lib/mysql.class.php'); $db = new MySQL(); if($db->Error()) $db->Kill(); //VARIÁVEIS DA FORM $id
Say I have two fields in a new or edit form: <%= f.text_field :email
This works: Entities.WorkOrderSet.Where(MyCustomMethod); This does not: Entities.WorkOrderSet.Where(o => MyCustomMethod(o)); ( [Edit] Even without new
EDIT: I added in where I create new instance of the class Process as
Whenever I try to edit existing or create new distribution provisioning profile on iOS
Why new()/delete() is slower than malloc()/free()? EDIT: Thanks for the answers so far. Please
EDIT : proper solution: void add(Student s) { if(root == null) root = new
I want to add a new form to the edit customer page, so far
I am quite new to client-side web development, so just feel free to edit
new_story GET /story/new(.:format) {:action=>new, :controller=>stories} edit_story GET /story/edit(.:format) {:action=>edit, :controller=>stories} story GET /story(.:format) {:action=>show,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.