apache / apache/grails-core

Grails 4.0.3 does not auto create Spring Cloud beans

Open
#11,587 6 comments 0 reactions 1 assignee Claimed by @puneetbehl View on GitHub
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

### Description

I created a Grails 4.0.3 app and integrated Spring Cloud libraries so that I can pull my config from Consul.
When I add the bootstrap.yml I get configuration errors on bootstrap. It appears that beans that Spring should be auto-creating are not being created and bean injections fail.

### Steps to Reproduce

1. Create an empty grails 4 app
2. Add dependencies to Spring Cloud Consul libraries
3. Configure bootstrap.yml to pull config from Consul
4. Try to bootstrap and see the bean injection failures

### Expected Behaviour

I expect my app to bootstrap and pull my config from Consul.

### Actual Behaviour

Bootstrap fails with Spring reporting that it can't find the beans that should be auto-created.

### Workaround

If I manually specify the beans in my resources.groovy file the app will bootstrap. This is not ideal and is not the behavior I would expect.

### Environment Information

- **Operating System**: Mac OS
- **Grails Version:** 4.0.3
- **JDK Version:** 1.8.0_222

### Example Application

https://github.com/sjrd218/ConsulCfgApp

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.