In services you can add
def grailsApplication
and it will be entered into your service.
If your class is a spring bean, you should be able to enter it inside
def doWithSpring = { ->
myBean( org.whatever.BeanClass ) {
grailsApplication = ref( 'grailsApplication' )
}
}
block of the main groovy plugin file.
If this is not the case, do you try using the Holders class?
def grailsApplication = grails.util.Holders.getGrailsApplication()