spring-cloud / spring-cloud/spring-cloud-config

Improper precedence between property in global section of application.yml and global section of foo.yml

Open
#3,220 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
2k
Forks
1.3k
Avg merge
2d 59m
Merged PRs (30d)
16

Description

I am using config server against a git repository. This git repostiory has two files, application.yml and foo.yml (my app is named foo).
example:

application.yml

myglobalsectionwithwhateverelse
---
spring.config.activate.on-profile: myprofile
myproperty: value1

foo.yml

myproperty: value2
---
spring.config.activate.on-profile: myprofile
... other properties

The property being resolved in my application when i use profile myprofile is value1, where I would expect it to be value2. This is because any properties in the app specific yaml should be more important.

I am using spring cloud starter config version 4.3.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the precedence issue in the config server using application.yml and foo.yml with the myprofile profile and the two conflicting myproperty values. Trace how the global and application-specific sections are resolved, then verify that foo.yml supplies the effective value for the profile.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, java, spring, spring-boot
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.