似乎只有grails.serverURL和grails.path才能根據環境配置進行識別。 bla和foo被忽略,不能在應用程序中使用 任何人都可以解決這個問題,並提供一種方法來獲得每個環境配置的bla和foo?如何在grails中擴展每個環境配置
environments {
production {
grails.serverURL = "http://alpha.foo.de"
grails.path = ""
bla = "text"
foo= "word"
}
test {
grails.serverURL = "http://test.foo.de"
grails.path = ""
bla = "othertext"
foo= "otherword"
}
}
如何訪問blah和foo?你可以發佈一些代碼,這些屬性沒有返回任何內容? – leebutts 2010-05-19 21:48:36
在答案中看到上面的代碼 – skurt 2010-05-20 11:25:57
你如何從服務中訪問這個blah和foo?它不適用於grailsApplication.config.blah ... – user2427 2010-06-17 21:22:54