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
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:
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 e3aa5b6#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.
The text was updated successfully, but these errors were encountered:
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 e3aa5b6#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.
The text was updated successfully, but these errors were encountered: