in Config.groovy I see this:
// set per-environment serverURL stem for creating absolute links
environments {
production {
grails.serverURL = \"h
As mentioned in a few of the comments, another option is the grails.utils.Holders class which was added in Grails 2.0. I prefer this approach since you can use it in classes that aren't configured with dependency injection.
import grails.util.Holders
class Foo {
def bar() {
println(Holders.config.grails.serverURL)
}
}