Closed as duplicate
Description
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!