Access grailsApplication from a Static Context in a Domain Class in a Non-Deprecated Fashion

The title says it all; referring to Grails and the fact that static access to the grailsApplication object is now deprecated. So how are you supposed to do it? The answer thanks to Burt Beckwith is in this post: static grailsApplication access from a domain class. Thanks Burt. The chance that anyone else ever searches this complicated concept in the same terms as me is somewhat rareā€¦ but if they do they will no doubt be happy to find this post. Maybe someone will just search something like static get grailsApplication and be helped.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.