apache / apache/grails-core

Spring wiring in DataStore services is not working correctly

Open
#14,597 3 comments 0 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

Don't know if this belongs in this repo or grails-core.

Thanks for reporting an issue for GORM, please review the task list below before submitting the
issue.

> WARNING: Your issue report will be closed if the issue report is incomplete and does not include an example. Make sure the below tasks not completed!

> NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (http://stackoverflow.com/tags/grails) or Slack (http://slack-signup.grails.org). DO NOT use the issue tracker to ask questions.

### Task List

- [x] Steps to reproduce provided
- [ ] Stacktrace (if present) provided
- [x] Example that reproduces the problem uploaded to Github
- [x] Full description of the issue provided (see below)

### Steps to Reproduce

If you initialise/create any services as interfaces or abstract classes and use the `grails.gorm.services.Service` annotation, and then also wire in the grailsApplication to verify, none of the annotated classes are included inside the Service artefact type. Even if they are in the `grails-app/services` folder, and end in `Service`.
I believe this is affecting wiring of spring bean dependencies.

### Expected Behaviour

Services should be in the Service artefact list and all beans should be wired.

### Actual Behaviour

They aren't

### Environment Information

- **Operating System**: Mac OS X Sierra
- **GORM Version:** 6.1.8
- **Grails Version (if using Grails):** 3.3.1
- **JDK Version:** 8u141

### Example Application

https://github.com/olliefreeman/grails-issues

Run the `rest.api.app.NonDomainServiceSpec` integration test

Contributor guide

Open the contributing guide

Research direction

Run the `rest.api.app.NonDomainServiceSpec` integration test in the linked `grails-issues` example first. Trace how `grailsApplication` discovers `grails.gorm.services.Service` classes, especially interfaces and abstract classes, and verify that the expected Service artefact entries and Spring bean wiring are present.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.