Configuration / Startup Options
Startup options for Java applications are typically given as System properties. To avoid duplicate maintenance and errors, all System properties are stored on a central Web Server. For development environment, a different Web Server is used, than for production (websvcpro).
This configuration is already available, when common-dependencies are in the list of dependencies (should be always the case).
Then, the first line of code in the main method should load the application specific system properties. For this purpose, several methods exist, e.g. load by filename:
Afterwards the default properties should be loaded. If you are using the GSI Application Base
class this is done automatically for you:
All configuration files are stored centrally in a git repository and are deployed to the cluster filesstem here:
To make changes
, check out the matching branch for the target environment and then commit and push your changes
Properties are kept in the order that they are loaded, i.e. properties once loaded are not overwritten. Options additionally specified on the command line for debugging or testing purposes overwrite any option loaded by the Property Config always. Typical order:
- Command line options
- Property Config application specific
- Property Config default
- Any other hardcoded system properties added later (not recommended)
In case of any questions: please contact Raphael