Orika Bean Mapping with Spring

This tutorial extends Orika Bean Mapping Tutorial by using Spring to configure Orika.

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

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

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

Step 4: Define the source and target beans.

Source Bean

Target Bean

Step 5: Orika custom mapper

Step 6: Spring DI Java config.

Step 7: Stand alone class with Spring for wiring up vi DI.


300+ Java Interview FAQs

Java & Big Data Tutorials