-
Notifications
You must be signed in to change notification settings - Fork 24
ConfiguringYourApp
Apache Tamaya is a configuration framework, which came out of the Configuration JSR. Its highly flexible and modular, allowing you to add or remove features as needed.
Currently, processing CLI args is not supported in Hammock. See also https://github.com/johnament/hammock/issues/5, however they are available as injectable resources, see also https://docs.jboss.org/weld/reference/2.3.4.Final/en-US/html/environments.html#_cdi_se_module
You have two ways of configuring via Tamaya, out of the box. More are to come.
On your classpath, you can add a META-INF/javaconfiguration.properties
which contains the configuration entries:
-
webserver.port
- the listener port -
file.dir
- the location to read static files from
You can implement any number of custom config sources for your application. One easy way, if you're pointing to a local file, is to extend from SimplePropertySource
and point to your configuration file, either on the classpath or on the file system.