...
Gliffy Diagram |
---|
size | L |
---|
name | config overlay high level |
---|
pagePin | 5 |
---|
|
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 |
---|
size | L |
---|
name | grouper config overlay specify hierarchy |
---|
pagePin | 2 |
---|
|
Edge cases
If you override a key with an empty value, that will blank out that config value
Gliffy Diagram |
---|
size | L |
---|
name | config overlay edge case 1 |
---|
pagePin | 3 |
---|
|
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 |
---|
size | L |
---|
name | config overlay el |
---|
pagePin | 3 |
---|
|
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:
...