Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

So, all the static holder classes have been deprecated (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'

like image 518
Stefan Kendall Avatar asked May 25 '11 17:05

Stefan Kendall


1 Answers

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
like image 147
tim_yates Avatar answered Oct 21 '22 15:10

tim_yates