After upgrading from Spring 6.1 to 6.2 we are noticing an issue that values inside our bootstrap.yml file aren't being replaced by environment properties. For example, we will use environment variables to list out of Spring Cloud Config Client names like such in our bootstrap.yml file:
spring.cloud.config.name: eureka_client,${PROPS_COMMON_FILES},${PROPS_ENV_FILES},more_properties,etc
And the above ${PROPS_COMMON_FILES} and ${PROPS_ENV_FILES} are export variables in our environment that are common across numerous services.
In Spring versions prior to 6.2.x, this worked fine, however due to changes to the PropertyPlaceholderHelper in this commit here https://github.com/spring-projects/spring-framework/commit/e3aa5b6b1154345c231acc7950d74cd56d7420c4#diff-2696179dea5ac1f4777fa47ef1ce064dc4d30525b42571ec05059470c5aa85d2R112 (specifically the changes to the "parseStringValue" method), these properties aren't interpretted correctly from the environment and instead the ${PROPS_COMMON_FILES} will remain unresolved in our application's request to the Spring Cloud Config server.
This commit states that "The only noticeable side effect is that the exception is no longer an IllegalArgumentException, but rather the dedicated PlaceholderResolutionException.", however I believe there's a functional change here that maybe wasn't anticipated.
For additional context, the Spring Cloud Config client is calling the environment method "resolvePlaceholders" while passing in this value: ${spring.cloud.config.name:${spring.application.name:application}}
I have a feeling the old implementation of the PropertyPlaceholderHelper class was doing nested resolutions whereas the new version may only be doing one level of resolution.
Comment From: ph33rtehgd
Ignore. I only just realized this was a bug introduced in 6.2.0 that was fixed in 6.2.1 by this issue: https://github.com/spring-projects/spring-framework/issues/34020