I need to override grails.serverURL
at runtime without having to regenerate the application's WAR file. I have tried various ways of setting grails.serverURL
in the application.properties
file and cannot get it to work.
Here is the environment specific portion of Config.groovy
:
environments {
prod
{
grails.serverURL = "http://nonexistentserver.somecompany.com:8080"
grails.anotherappspecificURL = "xcc://user:password@server.somecompany.com"
}
Basically, our application.properties
looks like this:
grails.env=prod
grails.war.deployed=true
app.grails.version=1.0.4
app.name=myapp
Below is one of the ways I have tried to override the settings. These are defined in Config.groovy
:
grails.serverURL=http://webserver1.somecompany.com:8080
grails.anotherappspecificURL=xcc://admin:xyzabc123@specificserver.somecompany.com
Any help with getting this to work without having to make code changes would be greatly appreciated!