Configuring Properties Files(And Autoload) in Java Applications

Discussions

News: Configuring Properties Files(And Autoload) in Java Applications

  1. 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.

    Threaded Messages (4)

  2. Commons Configuration[ Go to top ]

    Apache Commons Configuration offers automatic reloading OOTB, and it allows to load configurations from a variety of sources (properties, XML, etc.)
  3. Re: Commons Configuration[ Go to top ]

    If you read the full article, it says, this is meant for apps where such frameworks/facilities are not available.
  4. Re: Commons Configuration[ Go to top ]

    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 available
    I am sorry but Commons Configuration is *not* a web based framework.
  5. 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