We are creating APIs using spring boot and there are some configurations that would supply as env in the docker container ad below:
config:
host: ${HOST}
apiKey: ${API_KEY}
I need this host and API key in my service class to make an external API call.
Is there any way to create Record
class directly from application.yaml as below in Spring boot?
public record Config(String host, String apiKey){}