grails / grails-data-mapping

GORM - Groovy Object Mapping
http://gorm.grails.org/
217 stars 197 forks source link

Data service not injected into service with @Listener method #1054

Open ZacharyKlein opened 6 years ago

ZacharyKlein commented 6 years ago

Steps to Reproduce

  1. Create a GORM data service
  2. Inject the data service into another Grails service that has a method annotated with @Listener

Expected Behaviour

Data service should be available as it is within a "plain" service method or controller action.

Actual Behaviour

The service is null

Environment Information

Example Application

zyro23 commented 5 years ago

this issue seems to extend to beans having @EventListener annotated methods. given bean dependencies like this:

DummyApplicationListener.dummyService is injected "successfully", but DummyService.dummyDataService is null

sample app for that one will be referenced asap