mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-05 16:59:28 +00:00
Binding in the child context does not work correctly when an
environment prefix has been configured. The prefix is not applied
to the child context's Environment and, therefore, prefixed
environment variables are ignored during binding.
We can fix the problem by reusing the parent context's
ManagementServerProperties rather than binding them again in the
child context. Doing so will fix the problem reported in gh-45857
that was introduced in 020fd7b and will also avoid an unnecessary
second binding of the properties.
gh-45858 may fix the problem more generally by applying the prefix
to the child context's environment. This would benefit situations
where the properties need to be bound in the child context because
they haven't already been bound in the parent.
Closes gh-45847