I have a secret on GCP, namely greeting with the secret-value being "Hello". When in my application I have the following code.
@Value("${sm://projects/221608087928/secrets/greeting}")
private String databasePassword;
@RequestMapping(value ="/test-user")
public String getUser()
return this.databasePassword;
}
I have the value (projects/221608087928/secrets/greeting) by running the following command.
gcloud secrets describe "$secret_name"| grep name
I would assume my browser returning "Hello". However it returns "//projects/221608087928/secrets/greeting". I have the gcp-secret-manager dependency installed in my POM. How can I have the following code return the secret-value?
Solved by updating dependency from
to