I have those properties:
idam.service.client_id=3V_CLIENT
idam.service.client_secret=${sm@AS_3V_CLIENT}
AND
@Setter
@Getter
@Configuration
@ConfigurationProperties(prefix = "idam.service")
public class IdamProperties {
private String address;
private String clientId;
private String clientSecret;
}
In PropertySourcesPlaceholdersResolver
:
protected String resolvePlaceholder(String placeholder) {
if (this.sources != null) {
for(PropertySource<?> source : this.sources) {
Object value = source.getProperty(placeholder);
if (value != null) {
return String.valueOf(value);
}
}
}
return null;
}
The value is :
value = <ByteString@7952348f size=8 contents="OMhhty78"> in spring.boot 3.4.6 (same on 3.5.0)
value = "OMhhty78" in spring.boot 3.4.5
Additional notes:
I'm using implementation com.google.cloud:spring-cloud-gcp-starter-secretmanager:6.2.1
.
Could you please investigate why the value is not retrieved anymore as String from the source? Thanks!
Comment From: sbrannen
Hi @radu-sancraian,
Congratulations on submitting your first issue for the Spring Framework! 👍
This looks like a duplicate of the regression reported in #34936, which I have fixed for inclusion in the upcoming 6.2.8 release.
Thus, please try out a 6.2.8 snapshot to see if the fix for #34936 also resolves your issue.
Information regarding how to consume snapshots can be found here.
I'd be grateful if you could reply here to let us know if the snapshot resolves your issue.
If it does not resolve your issue, we can reopen this issue.
Cheers,
Sam
Comment From: radu-sancraian
Hi @sbrannen ,
I just tested with implementation("org.springframework:spring-context:6.2.8-SNAPSHOT") and it works.
Comment From: sbrannen
I just tested with implementation("org.springframework:spring-context:6.2.8-SNAPSHOT") and it works.
Awesome! 👍
Very glad to hear that it works for your use case, too.
Thanks for letting us know!
Comment From: radu-sancraian
Hello @sbrannen,
Do you have any information on when the next Spring Boot release (3.5.1) is expected? It should include this fix.
Thanks, and have a great day!
Comment From: bclozel
@radu-sancraian See https://spring.io/projects#release-calendar