Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I split config.groovy file of grails?

Tags:

grails

As there is sensitive code in the config.groovy file, I am afraid that my friends will commit with bugs in this file. When getting svn update, we too will get the buggy config code.

Can i split the code at config.groovy in such a way that the sensitive code remains untouched and the other can be changed frequently?

like image 356
Aman Adhikari Avatar asked Jul 13 '12 11:07

Aman Adhikari


1 Answers

Inside your main config file you are able to access this variable:

grails.config.locations

It is a list of configuration file locations to which you can add your own files:

grails.config.locations << 'file:MyConfigFile.groovy'

These files will then be added to your configuration.

For a more elaborate setup see this blog post: http://www.pasopas.nl/2012/loading-grails-configuration-files-update/

like image 162
Marijn Avatar answered Nov 01 '22 01:11

Marijn