spring-projects / spring-projects/spring-boot
Make it easier to consume multiple connection details beans of the same type with Docker Compose
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
If you define multiple services of the same type in your Docker Compose yaml, you'll get multiple connection details beans of the same type in the context. Those beans are hard to inject as you can't just rely on the type. Matching by name is possible, but we don't document how the names are generated.
Some things that we could do:
- Document how the bean names are generated
- Support a label that allows the bean name to be specified
- Support a label that allows a connection details bean to be marked as
@Primary, with@Qualifier,@Fallback, etc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files or tests. Start by tracing how Docker Compose connection details beans are named and injected, then compare the three proposed approaches; done means a documented or implemented way to consume multiple same-type beans, with coverage for the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, java, spring-boot
- Domain
- backend, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100