3

I am using Dozer to map java bean to java bean. Creating Dozer instance with spring injection but seems some thing wrong when I am specifying absolute path of mapping files.

Here is snap of how I am defining it in spring config file :

<bean id="mapper" class="org.dozer.DozerBeanMapper">
  <property name="mappingFiles">
    <list>
        <value>file:C:/XXX/XXXXXX/dsdsd/dasdas/resosdfsdfurces/dozfsdfsder/agreement_account_mapping.xml</value>

   </list>
  </property>
</bean>

and here is the initialization time logs :

2017-02-07 10:57:58,026 INFO  [DozerBeanMapper:175]: Initializing a new instance of dozer bean mapper.
2017-02-07 11:19:00,785 INFO  [DozerBeanMapper:222]: Using the following xml files to load custom mappings for the bean mapper instance: [file:C:/GCDB/GCDB_Integration/src/main/resources/dozer/agreement_account_mapping.xml]
2017-02-07 11:19:00,786 INFO  [DozerBeanMapper:224]: Trying to find xml mapping file: file:C:/GCDB/GCDB_Integration/src/main/resources/dozer/agreement_account_mapping.xml
2017-02-07 11:19:00,788 INFO  [DozerBeanMapper:226]: Using URL [file:C:/GCDB/GCDB_Integration/src/main/resources/dozer/agreement_account_mapping.xml] to load custom xml mappings
2017-02-07 11:19:00,807 INFO  [DozerBeanMapper:228]: Successfully loaded custom xml mappings from URL: [file:C:/GCDB/GCDB_Integration/src/main/resources/dozer/agreement_account_mapping.xml]

You can observe it taken almost 22 minutes to load.

Any thing wrong I am doing here?

Gurwinder Singh
  • 38,557
  • 6
  • 51
  • 76
Hus Mukh
  • 125
  • 12

0 Answers0