in Config.groovy I see this:
// set per-environment serverURL stem for creating absolute links
environments {
production {
grails.serverURL = "http://www.changeme.com"
}
}
what is the correct way to access that at runtime?
In more recent versions of grails ConfigurationHolder has been deprecated.
Instead you should use the grailsApplication object.
grailsApplication.config.grails.serverURL
If in a Controller or Service then use dependency injection of grailsApplication object. e.g.
class MyController{
def grailsApplication
def myAction() {
grailsApplication.config.grails.serverURL
}