Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct external application properties load order #24211

Closed
wants to merge 1 commit into from

Conversation

MikeN123
Copy link

It seems the documentation is showing the wrong order for configuration properties.

The correct order judging from ConfigDataEnvironment and the remainder of the documentation is:

		locations.add(ConfigDataLocation.of("optional:classpath:/"));
		locations.add(ConfigDataLocation.of("optional:classpath:/config/"));
		locations.add(ConfigDataLocation.of("optional:file:./"));
		locations.add(ConfigDataLocation.of("optional:file:./config/*/"));
		locations.add(ConfigDataLocation.of("optional:file:./config/"));

But the documentation states the subdirectories of ./config are loaded last. I have corrected this and added 'in the current directory' to make sure everyone understands which subdirectories are meant.

I have not verified this is actually the correct loading order, but the code seems clear enough to me.

@philwebb
Copy link
Member

philwebb commented Dec 1, 2020

Thanks for the PR @MikeN123. After some discussion we think it would be better to change the code rather than the docs. I've opened #24308 to deal with that.

@philwebb philwebb closed this Dec 1, 2020
@philwebb philwebb added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 1, 2020
humaolin pushed a commit to humaolin/spring-boot that referenced this pull request May 7, 2022
Includes aligned createRelative signature and dedicated java.io.File test.

Closes spring-projectsgh-24211
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants