spring-projects / spring-projects/spring-boot

Improve 'spring.config.import' support to allow later imports to use data from earlier ones

Open
#45,794 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

I have created a scenario where I need a password property loaded from configtree: to use for the config server client, which is secured.

I noticed when the configserver: ConfigDataLoader is not marked optional it will fail because the password is not resolved yet in org.springframework.boot.context.config.ConfigDataEnvironment#processInitial but only later in org.springframework.boot.context.config.ConfigDataEnvironment#processWithProfiles

see https://github.com/lorenzbaier/spring-config-server-client-test

I think that the properties should be added to the context as soon as they are available at org.springframework.boot.context.config.ConfigDataImporter#load

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

Start with ConfigDataEnvironment#processInitial and #processWithProfiles, then trace how ConfigDataImporter#load makes loaded properties available. Reproduce the configtree password and secured configserver scenario from the linked spring-config-server-client-test; done means a later configserver import can use data from an earlier import without being marked optional.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend
Issue type
Feature
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.