Basic Configuration
Once deployed, Para will initialize itself by loading the default configuration file reference.conf.
To load your own configuration you need to set one of the following system properties:
config.filespecifies a filesystem path, again it should include the file extensionconfig.urlspecifies the URL from which to load the config file
For example:
java -jar -Dconfig.file=./para-application.conf para.jarYou need to set these properties before calling Para.initialize() or at the startup of your servlet container.
If you have a file called para-application.conf or application.json on the classpath, Para will pick it up automatically.
Here’s a minimal example of the Para configuration file:
para.env = "production"para.print_logo = truepara.port = 8080The configuration logic is to read system properties first, then environment properties and finally check the config file. So the order of precedence is as follows:
System.getProperty() > System.getenv() > para-application.confNote that environment properties containing . (dots) are invalid and will be replaced with _ (underscore).
For example, the environment property $para_env is equivalent to para.env in the config file.
All configuration properties can be overridden using system properties, e.g. System.setProperty("para.port", "8081"),
or -Dpara.port=8081 or using ENV variables export para_port=8081.