You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Load property files with any extension from any location (New in 0.13.0)
h-thurow edited this page Feb 26, 2017
·
1 revision
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.
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.