Dozer with Spring & Maven Tutorial

This tutorial compliments Basic Dozer Tutorial by adding Spring.

Step 1: Create a simple Maven project from a command-line. Just press enter for all the prompts.

Step 2: Import the above “simple-dozer” folder in the file system into eclipse. File –> Import –> “Existing Maven Projects” and then select the “simple-dozer” folder that was created by the “Step 1” from the file system.

Step 3: Open the pom.xml file and add the dependencies for Dozer and Spring

Step 4: Define the source and target beans.

Source Bean

Target Bean

Step 4: The mapping definition file “dozer-bean-mappings.xml” in the src/main/resources folder.

Step 5: Spring Java configuration “” to bootstrap dozer

Step 6: Finally, the unit test class to create a source bean and map it to the target bean.

Project Structure



Java Interview FAQs

800+ Java Interview Q&As