Skip to content

Custom property conversion bypassed again in Spring Boot 3.4.6 and 3.5.0 #45715

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

Open
adnan-selimovic opened this issue May 28, 2025 · 3 comments
Labels
status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged

Comments

@adnan-selimovic
Copy link

adnan-selimovic commented May 28, 2025

A previously resolved issue appears to have resurfaced in Spring Boot 3.4.6 and 3.5.0.

When resolving configuration properties, ConfigDataEnvironmentContributorPlaceholdersResolver invokes String.valueOf() directly, rather than relying on the registered ConversionService. This bypasses any custom converters and leads to incorrect behavior for types that depend on specific conversion logic — for example, com.google.protobuf.ByteString, which should use toStringUtf8() instead of the default toString().

This behavior mirrors the issue originally reported in spring-projects/spring-boot#39944 (originally identified in GoogleCloudPlatform/spring-cloud-gcp#2690), and was previously known to affect Spring Boot versions 2.4.x through 3.2.x.

It is also reported in the spring-cloud-gcp repo under GoogleCloudPlatform/spring-cloud-gcp#3821 for investigation.

@bclozel
Copy link
Member

bclozel commented May 28, 2025

Isn't this rather a Spring Framework bug as raised in spring-projects/spring-framework#34936 ?

Can you reproduce this issue with the latest Framework SNAPSHOTs still?

@bclozel bclozel added the status: waiting-for-feedback We need additional information before we can continue label May 28, 2025
@bushwakko
Copy link

This seems to be fixed here: spring-projects/spring-framework#34936
and going into the 6.2.8 release due June 12th.

Maybe bumping to 6.2.8 should be included in the 3.5.1 milestone? https://github.com/spring-projects/spring-boot/milestone/389

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jun 3, 2025
@bclozel bclozel added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Jun 3, 2025
@bclozel
Copy link
Member

bclozel commented Jun 3, 2025

@bushwakko I'm waiting for @adnan-selimovic 's feedback before considering this as a duplicate.

Maybe bumping to 6.2.8 should be included in the 3.5.1 milestone?

We'll create the issue with a semi-automated process. We'll upgrade in due time as usual with our release train.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

4 participants