EasyConf integrates the system properties to unify the sources of configuration. This feature can be used to override the value of a property existent in a properties file or to define a new property.
When used to overwrite a value of an existent property, the property name must be prefixed by the name of the component. For example, if you have in my-component.properties:
You can overwrite this value executing the application with the following command line arguments:
java -Dmy-component:db.type=oracle MyApp
System properties are also available to be used as variables in the properties files. For example:
Specifying system properties that will act as new properties is useful, for example, when including files. Using this feature you can allow the user to choose the name of the file that will contain properties with overridden values (Rememenber that if the file does not exist it will be silently ignored). For example, if you execute the application with:
You can include an external file in my-component.properties with:
This feature is used to support multiple environemnts