Closed paul-hammant closed 7 years ago
Command-line arguments are documented here: http://jooby.org/doc/#conf-env-and-logging-precedence
Suggestion:
automatically translate to:
java -jar myapp.jar application.port=8888 application.path=/myapp
and be accessed in the application, like so:
Config cfg = require(Config.class);
String myPath = cfg.get("application.path")
// more examples in Lightbend's Config documentation above
It is couple of the lines of Java code that is missing from the conf-env-and-logging-precedence section.
One that is missing, is how to connect command-line arguments to the result of
require(Config.class)
.Lightbend's own documentation doesn't show that either.