HTTPS clone URL
Subversion checkout URL
Clone this wiki locally
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. The plugin creates a single domain class named ConfigProperty.
*NOTE: You need not re-deploy or restart your application after making the config property changes through this plugin. *
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 at the time of bootstrap if there is no already persisted object of ConfigProperty domain class (used by the plugin), else it updates the config map values from the database.
Use url /myapp/configProperty/updateConfigMapToDB to persist current map values into the database.
Use url /myapp/configProperty/updateConfigMapFromDB to update current map values from the database.
- Install the plugin using the following command:
grails install-plugin dynamic-config
- To use the plugin just goto the URL: //configProperty, where you will find user interface to create, edit or delete all of the config properties present in Config.groovy.
It is as simple as this :-)
Do not use suffix 'l' at the end of long values. This will make the value considered as String.
Values ending-with single-quote(') do not get persisted / updated.
Values containing tripple-quotes(''') do not get persisted / updated.
As of now, the plugin DOES NOT support the persistence of List as well as Closure values from the Config.groovy, though the persistence of List values is planned to be supported soon.
IMPORTANT: In the current version, no security feature is implemented. You need to protect access to configProperty controller using a Grails Filter or whatever other security mechanism that you use in your application to manage access.
Please feel free to come up with new enhancements or suggestions. Reach me at email@example.com.
- First Release
Fixed bug related to updating config map from database on bootstrap.
Added two helper urls /myapp/configProperty/updateConfigMapToDB & /myapp/configProperty/updateConfigMapFromDB
Ques: I am getting the following error on application starup after I iinstall the plugin :
org.hibernate.DuplicateMappingException: duplicate import: ConfigProperty refers to both com.myapp.ConfigProperty and org.grails.plugins.dynamicConfig.ConfigProperty (try using auto-import="false")
Ans: The plugin uses the domain class ConfigProperty, so if your application uses the domain class with the same name, either rename your domain class or change its database mapping.
Ques: This plugin is using several depreciated library's and functions. Are there any know problems with later versions of Grails?:
Ques: This plugin appears to not have been updated since Grails 1.3.4 (now a very old version). Is there any interest in it being maintained/updated? (Or are there now better ways to do this?):