Fork me on GitHub

Configuration

Dozer configuration properties can be customized via an optional Dozer properties file. By default, Dozer will look for a file named dozer.properties to load configuration properties. If a properties file is not found or specified, default values will be used.

Dozer is distributed with an example dozer.properties file in /config that shows the various options. Just put the example file in your classpath and customize it.

An alternative Dozer properties file can be specified via the dozer.configuration system property. ex) -Ddozer.configuration=someDozerConfigurationFile.properties

Dozer Configuration Properties

Property Name Description Valid Values Default
dozer.statistics.enabled Specifies whether Dozer collects runtime mapping statistics. Note that statistics gathering imposes certain performance overhead. It is not recommended to enable this option in production settings under heavy load. true|false false
dozer.autoregister.jmx.beans Specifies whether Dozer will auto register it's JMX beans with the PlatformMDBServer on startup. true|false true
dozer.el.enabled Specifies whether during Xml mappings parsing Dozer will recognize EL expressions. true|false false
dozer.cache.converter.by.dest.type.maxsize Specifies the max size for one of Dozers internal caches. 0 - Long.MAX_VALUE 10000
dozer.cache.super.type.maxsize Specifies the max size for one of Dozers internal caches 0 - Long.MAX_VALUE 10000
org.dozer.util.DozerProxyResolver Specifies implementation of DozerProxyResolver to be used Valid class name Default implementation
org.dozer.util.DozerClassLoader Specifies implementation of DozerClassLoader to be used Valid class name Default implementation

Debugging Initialization

One time Dozer initialization information can be optionally sent to System.out to help with debugging.

To enable this additional debugging info, set the dozer.debug system property.

ex) -Ddozer.debug=true

Types of information that will be sent to System.out are loading of configuration file, loading of custom xml mapping files, version info, classloader info

         
dozer:  Trying to find Dozer configuration file: dozer.properties
dozer:  Using URL [file:/local/subversion_projects/dozer/trunk/ta
rget/test-classes/dozer.properties] for Dozer global property con
figuration
dozer:  Reading Dozer properties from URL [file:/local/subversion
_projects/dozer/trunk/target/test-classes/dozer.properties]
dozer:  Finished configuring Dozer global properties
dozer:  Initializing Dozer.  Version: ${project.version}, Thread 
Name:main
dozer:  Dozer JMX MBean [org.dozer.jmx:type=DozerStatisticsContr
oller] auto registered with the Platform MBean Server
dozer:  Dozer JMX MBean [org.dozer.jmx:type=DozerAdminController
] auto registered with the Platform MBean Server
dozer:  Initializing a new instance of the dozer bean mapper.
dozer:  Initializing a new instance of the dozer bean mapper.
dozer:  Using the following xml files to load custom mappings fo
r the bean mapper instance: [fieldAttributeMapping.xml]
dozer:  Trying to find xml mapping file: fieldAttributeMapping.x
ml
dozer:  Using URL [file:/local/subversion_projects/dozer/trunk/t
arget/test-classes/fieldAttributeMapping.xml] to load custom xml
 mappings
dozer:  Successfully loaded custom xml mappings from URL: [file:
/local/subversion_projects/dozer/trunk/target/test-classes/field
AttributeMapping.xml]