We have an application in Grails 2.0 that we have working when we run on localhost:8080
. In Config.groovy
, the application has a grails.serverURL
property that has to be set for the current host and current app name. However, in our QA environment, the middleware team takes the war we give them and deploys it to a server whose name and port we don't know ahead of time.
It seems like Grails assumes that you are always going to register a domain name and then have full control over that name and the port the app is running, which is not the case at all.
What is the best way to address this problem? We have tried simply removing grails.serverURL
, but Spring Security appears to use it for building up the url for redirects on login success and logout success.
development { grails.serverURL = "http://www.notused.com/${appName}" }
production { grails.serverURL = "<we don't know yet>" }
And before anyone asks, I have read numerous posts on StackOverflow and elsewhere that relate to this issue but do not answer this specific question.