News: Configuring Properties Files(And Autoload) in Java Applications
Here's (http://bit.ly/8qX4X8) an article showing a simple and elegant way of reading and configuring properties/configuration files in Java applications using annotations. Properties files are one of the most frequently used mechanism for storing configuration information for applications. And so is the code to access these properties from the application. This article is intended to demonstrate (source code can be downloaded here) a simple way of configuring and using Properties files in Java applications. Usage Example: 1. Cofiguring: @PropertiesHolder(file="app.properties", autoLoad=true) private static Properties appProps; 2. Reading: String title = PropStore.getAppProps().getProperty("APP_TITLE"); The full article can be read here: http://bit.ly/8qX4X8 Please post your comments and feedback.
- Posted by: Parminder Singh
- Posted on: January 26 2010 10:05 EST
- Commons Configuration by Antonio Petrelli on January 27 2010 04:07 EST
- Re: Configuring Properties Files(And Autoload)... by Richard Jome on February 04 2010 06:57 EST
Apache Commons Configuration offers automatic reloading OOTB, and it allows to load configurations from a variety of sources (properties, XML, etc.)
If you read the full article, it says, this is meant for apps where such frameworks/facilities are not available.
If you read the full article, it says, this is meant for apps where such frameworks/facilities are not available.Are you sure? At the end of the article it says:
Please note, that most of the modern web based frameworks do have some sort of Properties/configuration framework built in. This article is intended for applications that do not have such frameworks/facilities availableI am sorry but Commons Configuration is *not* a web based framework.
ere's an article showing a simple and elegant way of reading and configuring properties/configuration files in Java applications using annotations. The article also contains source code with each step explained. » Full text http://redtram.com/redirect/news/237298888/ Thanks =========== personalized baby name gifts unique baby gifts Baby Name Gift