spring-cloud-gcp: Convertor for ByteString to String is not working in v3.4.0
Describe the bug
I have added to build.gradle to use v3.4.0 and added spring.config.import property: sm:// and set spring.cloud.gcp.secretmanager.legacy: false.
But still, I m getting No converter found capable of converting from type [com.google.protobuf.ByteString$LiteralByteString] to type [java.lang.String].
I have tried to debug the code and have following observation:
GenericConversion.Converters (from spring core 5.3.22) have a Map object converters, which have count of 167 when addConverter is called from GcpSecretManagerEnvironmentPostProcessor.
But sometimes later remove method is called (once), but before that itself the count is reduced to 73.
When it actually hit the code to find the converter for ByteString the count is 52 without ByteString converter.
It looks like there are 10 converters object has been created with different count of converters added:

But when I add a custom converter as mentioned in here, the count would be 53, with my custom converter present.
Am I missing something or some configuration?
PS: I have datasource configuration in place, so fetching data from GSM happens prior to application completes startup.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (8 by maintainers)
Hi @mmoayyed, thanks for your question.
Could you open a new issue and post a sample reproducer? I’ll follow up there.