-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Clarify documentation regarding relaxed binding of environment variables #22974
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
Comments
Thanks for the report. There has been some improvements in relaxed binding that makes it more ubiquitous and I agree the section you've referenced could use a review. |
hahahaha, have found the same problem, and I've asked at gitter but got no response. I'm suprised to find this issue. |
#10873 added support for replacing Relaxed binding is working with
This is covered in the paragraph to which the limited entry in the table refers:
The table refers to it is a note, but it is a plain paragraph in the documentation. I think we could improve things by turning it into a |
It seems that there are wrong information in the docs in the section Binding from Environment Variables. A green info section states the following:
After some testing with the newest version of spring boot it turns out that it is actually possible. For example we can not only bind the environment variable
TEST_MYPROJECT_MYVALUE
but alsoTEST_MY_PROJECT_MY_VALUE
to@ConfigurationPropertis
and@Value
like this:So this section in the docs should be adjusted I guess. Moreover, in section @ConfigurationProperties vs. @Value I do not understand why Relaxed Binding is marked as "limited" for
@Value
. From my testing all environment name combinations could be used for both@ConfigurationProperties
and@Value
. E.g. all of those combinations could be bound to the@ConfigurationProperties
and@Value
shown above:I could not find a single combination that was working for
@ConfigurationProperties
but not for@Value
.The text was updated successfully, but these errors were encountered: