Skip to content

Wrong ordering of property sources in config client when using spring.config.import #2417

@telperinion

Description

@telperinion

Describe the bug
We are using a composite configuration at the config-server (at least 3 different backends(vault,file,git)) and have been moving from bootstrap configuration to import on the client side.

We are facing 2 issues:

  1. if the searchLocations in git for the configuration contains a "-default" (i.e. /configuration-default/{application}) the config client is using this as a priority property source and adding this even before an override repo.
  2. an -default in the file name (i.e application-default.yaml) has the same effekt rendering properties that are defined in a higher order repository (i.e. vault, or overrides) unusable in the application.

Is the 2. one intended or not (in https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#config-data-import it is said that the default profile is used to load further profiles, but that the default profile has than precedence over the rest (even the override) is not documented there)?
If so, at least the first on is a bug in my eyes.

Sample
If needed(and somebody asks :) ) i will provide an sample project for this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions