Skip to content
Abhishek-Tejpaul edited this page Sep 11, 2010 · 17 revisions

Grails-Dynamic-Config-Plugin

This plugin is created using Grails 1.3.4 and gives your application the ability to dynamically change the config properties as defined in Config.groovy.

This plugin is useful in situations where you need to make run-time changes in the behavior of your application through config properties. Ex:- Suppose you want to control the e-mail sending functionality of your app through a config property, say 'sendMail', then while your app is up and running you can configure its value to true/false to either start or stop the mail sending functionality.

**NOTE: You need not redeploy or restart your application after making the config property changes through this plugin. **

###Features###

  • Dynamic (on-the-run) changes to your Config properties.

  • Addition of new config property at the run-time.

  • Supports various data types as values for the config property (Integer, Boolean, String, Float, Long, Double).

  • Persists config properties in the database.

###User Guide###

  1. Install the plugin using the following command:

  2. The plugin provides a domain class named ConfigProperty.groovy.

  3. To use the plugin just goto the URL: //configProperty, where you will find the CRUD to create, edit or delete the config properties.

  4. In the CRUD, you can also create an already existing config property as defined in Config.groovy and this plugin will overwrite the property value in Config.groovy.

IMPORTANT: Please make sure to keep the URL protected so that no one from outside can hit it and change the config properties of your app. One of the ways to do is to use Grails Filters to make sure that the user is logged in or an authorized one.

It is as simple as this :-)

Clone this wiki locally