}
private BeanMapper configureBeanMapper(){
// Optionally, use xml structured file.
SimpleXmlMapperConfiguration fileConfig = new SimpleXmlMapperConfiguration();
fileConfig.setConfigurationFile("/net/freedom/gj/beans/xml/beanA-to-beanB.xml");
fileConfig.setSourceType("net.freedom.gj.beans.EntityBeanA");
fileConfig.setTargetType("net.freedom.gj.beans.EntityBeanB");
//You can use multiple configuration files to map single complex object.
//Optionally,using text custom format file.
SimpleFileMapperConfiguration additionalConfig = new SimpleFileMapperConfiguration();
additionalConfig.setConfigurationFile("/net/freedom/gj/beans/txt/beanA-to-beanB-mapping2.txt");