- Put all your property files into a jar and place the jar in the 'lib' directory of your grails project
- Modify the Config.groovy and add the line -
grails.config.locations = [ "classpath:file1.properties", "classpath:file2.properties" ]
- Then depending where you are in the app you have access to the property variables and can dereference them e.g. ${my.file1.prop}
Friday, 15 July 2011
Grails Jar'd Configuration Property Files
Say you have an existing Java project which has a plethora of configuration property files and you want to use some of these properties in your new Grails project. How can you do this? One approach is to:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment