You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@philwebb, thanks for creating and analyzing this issue, especially after my unpromising false start in the original issue (bogus code snippet, no reproducer).
I gather from your analysis that Spring Boot does not read all environment variables via the same single code path.
Did I just "get lucky" 😉, and strike the only environment variable for which Spring Boot ignores the environment prefix?
Do other configuration properties also not respect the prefix?
I acknowledge that this question might not be straightforward to answer. I'm not asking you to go on a time-consuming bug hunt.
Still, given the analysis that you've done for this issue, would it be quick and easy for you to search for similar telltale code that ignores the environment prefix when reading environment variables? Doing that now might avoid creating multiple similar property-specific issues in the future. Just a thought. I totally get that you might not have time for this.
I'd like to set an environment prefix for my app, but the surprise discovery that Spring Boot does not (as you wrote) respect the prefix on all configuration properties spooked me. I don't want my app users to be similarly surprised. I can reduce that risk by testing the common properties that I think users are likely to use, but I'd prefer to have higher confidence that, to your (the Spring Boot developers') knowledge, Spring Boot consistently respects the prefix on all properties. (I acknowledge that "I don't want..." and "I'd prefer..." are my issues; my problems, not yours.)
See #45370 (comment) for a reproducer.
A bit of analysis shows that this line in
ConfigDataEnvironmentContributor
is creating the source, but unlikeSpringConfigurationPropertySources.adapt
it is not respecting the prefix.The text was updated successfully, but these errors were encountered: