-
Notifications
You must be signed in to change notification settings - Fork 17
Load property files with any extension from any location (New in 0.13.0)
To ease the use of Simple-JNDI within an existing installation where no root directory exists or just one configuration file is used or where the configuration files are spread over different locations you can now specify a list of files and/or directories to load properties from, i.e.
org.osjava.sj.root=file1.cfg:directory1/file.properties:directory2
Separate them by the platform specific path separator. When loading a file directly you can preserve the filename as context name by setting
org.osjava.sj.filenameToContext=true
Please note the extension ".cfg" in the example. When directly loading a file any extension except for .ini or .xml will be interpreted as .properties file.
So you can easily load your configuration properties and access them via JNDI from anywhere in your application.