title: Grails 2.x service injection in Groovy/src
body: <p>I'd like to inject my service in Groovy/src class. The normaln dependency injection doesn't work:</p>
  
  <pre><code>...
  def myService
  ...
  </code></pre>
  
  <p>I'm able to use this (it works):</p>
  
  <pre><code>def appCtx = ApplicationHolder.application.getMainContext()
  def myService = appCtx.getBean("myService");
  </code></pre>
  
  <p>but the ApplicationHolder is deprecated. Is there any better solution?</p>
  
  <p>Thanks for any suggestion</p>