Grials Externalizing properties

I wanted to add a properties files to the existing war file before app is deployed through a script.
Several steps
1) open the {appName}/grails-app/conf/Config.groovy
2) change “grails.config.locations” property in the file to

grails.config.locations = [“file:./grails-app/conf/${appName}”]

3) create the {appName} in


Possible problem: In war file, the properties file ends up in


directory, so It might be better to just uncomment the
grails.config.locations existing already in step 2
Need to test.

Also see this site .

“The configuration mechanism of Grails is nice, but there is a small trouble. The configuration files are compiled and packed into the deployment package (WAR) during project build phase. However, one usually does not want to rebuild the whole application just to change say a database password. So, how to do it? “

This could be another option — but the problem is given a war file in tomcat how does one access those files
Does the


for the property ” “grails.config.locations” take care of it?
Need to test

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: