Java properties files
Configuring a Java web server for DXA involves configuring various properties files. In addition, there are other configuration changes that may be necessary.
Import order and value overrides
DXA includes a number of constants and values that can be configured, if necessary. The default values typically do not require any modification, but there may be instances where you want to override the default values.
The following lists the Java properties files in the order they are imported:
- dxa.addons.<anything>.properties - These properties have highest priority, and any property from this file type will override the others. Note that within this group, the order of loading properties files for individual add-ons is random.
- dxa.properties - Contains basic configuration properties, which should override the module and default property values.
- dxa.modules.*.properties - Contain properties for DXA modules, which should override the default property values.
- dxa.defaults.properties - Contains default values for DXA, which have the lowest priority. Note that as a DXA user or implementer, you have no access to these properties.
Sample resolution of values
- dxa.default.properties
- dxa.my.property=my default value
- dxa.link=default link
- dxa.server=server
- dxa.modules.test.properties
- dxa.my.property=my module value
- dxa.module=my module
- dxa.properties
- dxa.my.property=my value
- dxa.server=overridden
- dxa.addons.special-environment.properties
- dxa.my.property=my environmental value
Result:
- dxa.my.property=my environmental value
- dxa.server=overridden
- dxa.module=my module
- dxa.link=default link