Conventions used by EasyConf

EasyConf follows a set of conventions to make it easier to use. Here is a list or the conventions currently in use:

  • Given a component named my-component its base configuration properties will be obtained from a file named my-component.properties.
  • Given a component named my-component its XML file will be obtained from a file named my-component.xml and the file which defines the mapping from XML to POJOs is obtained from a file named my-component.digesterRules.xml.
  • A file named global-configuration.properties will be read for every component to find overridden property values.
  • The property names of the global-configuration.properties file may be prefixed with the name of the component followed by a colon character. For example:
                  my-component:property-name=property-value
                
  • A special property named include-and-override can be used to include files. In case of collision of property names the included ones will override the values given in the file which contains the inclusion instruction. If several include-and-override files are used, the last ones will override any previous property values
  • When using filters, property selectors are appended to the property names inside brackets. Example:
                  property-name[selector1][selector2]=property-value
                
  • Special variables:
    • easyconf:companyId: contains the value of the companyId used by the client application when retrieving the configuration or null if none was used.
    • easyconf:componentName: contains the current componentName

Other significant strategies of EasyConf are:

  • Any file looked for that doesn't exist will be silently ignored. An exception is if the properties of a component is explicitly requested and there is no properties file or the object configuration is explicitly requested and there is no XML file