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