I have a record:
@ConfigurationProperties("service.api")
@ConstructorBinding
public record ServiceApiConfig(String clientId, String clientSecret) {}
and an application.properties file:
service.api.client_id=client_id
service.api.client_secret=client_secret
and the binding works when I'm doing local development.
What I want to do is to use Azure services (Azure Spring Apps, Key Vault, etc.) and my question is whether I can, inside application.properties file, reference secrets stored in the Key Vault. Something like this:
service.api.client_id=<name-of-the-id-kept-in-the-vault>
service.api.client_secret=<name-of-the-secret-kept-in-the-vault>
Tutorials I've seen make me think that the only way to do the binding is by using @Value("${nameOfTheSecret}") annotation on fields in java classes. Is it possible to do it in a way that I want?