Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Gliffy Diagram
sizeL
nameconfig overlay high level
pagePin5

Specify the hierarchy

If you do not want to use the base and the overlay in the classpath, you can specify which files are used for the properties.  This must be specified in the base or config file.  Each config file has its own key for this hierarchy, but it is listed in the base config file.  Here is an example for the grouper.properties.  Note, it is recommended to include the classpath base properties, though it is up to you.  You can specify config files by classpath or file location.

Gliffy Diagram
sizeL
namegrouper config overlay specify hierarchy
pagePin2

Edge cases

If you override a key with an empty value, that will blank out that config value

Gliffy Diagram
sizeL
nameconfig overlay edge case 1
pagePin3

Config file reloading

You can specify the number of seconds that the config file will be checked to see if there are differences.  This is not a trivial check, so it is recommended not to be more often than every 60 seconds.  If -1 is specified, then it will never be checked.  If it is 0 then it will be checked each time a config param is referenced.  Note, this is another properties that must be specified in the base or config file, it cannot be put in other places specified in the hierarchy.  Here is an example for grouper.properties:

...

Gliffy Diagram
sizeL
nameconfig overlay el
pagePin3

To use a custom class in the EL, Write a class with a static method, compile, put in a jar on the classpath.  There should be a default constructor in the class.  Refer to the fully qualified class in EL:

...