我正在使用Dozer将java bean映射到java bean。 使用spring注入创建Dozer实例,但在指定映射文件的绝对路径时似乎有些不对劲。
以下是我在spring配置文件中定义它的方法:
<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>
这是初始化时间日志:
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]
您可以观察到它需要花费大约22分钟才能加载。
我在这里做错了什么?