开发者

Grails 1.4 - What happened to ApplicationHolder, ConfigurationHolder, etc.?

So, all the static holder classes have been deprecate开发者_高级运维d (and are bombing my tests).

What's the new way to get at application metadata, for example? Before, you could use ApplicationHolder.application.metadata.'blah'


They're been deprecated in favor of the injection method I believe...

Can you add:

def grailsApplication

To your classes that require this, then it should be injected at run-time, and you should be able to do:

grailsApplication.metadata.'blah'

As before?

Configuration is available via:

grailsApplication.config
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜