I have a command class that needs to call a service.
import org.codehaus.groovy.grails.commons.ApplicationHolder as AH
class FilterVisitCommand {
def accessRightsService = AH.application.mainContext.accessRightsService
def customerService = AH.application.mainContext.customerService
...
}
Such a vision of the service with the help of the application owner works, however, is corrupted. Is there any other way for the service to be introduced? Only the class "def accessRightsService" does not work for the command class.
source
share