apache / apache/grails-core

Data service not injected into service with @Listener method

Open
#14,588 1 comment 2 reactions 0 assignees View on GitHub
relates-to: gorm
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

### 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

- **Operating System**: macOS
- **GORM Version:** 6.1.8
- **Grails Version (if using Grails):** 3.3.2
- **JDK Version:** 1.8

### Example Application

- https://github.com/ZacharyKlein/data-services-inject

Contributor guide

Open the contributing guide

Research direction

Start with the linked data-services-inject example application and locate the Grails service containing the @Listener method. Trace how the GORM data service is injected there compared with a plain service method or controller action. Done means the data service is available inside the listener method as described in the expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.