I am trying to read secrets on application startup and make it available for
- Other classes to access
- And to access the value from other yaml files (for integration with other tools Eg.api keys).
The springboot application uses EnvironmentPostProcessorImpl
class that reads the secrets to a Map<String,String>
on startup.
I would like to understand what would be a correct way to make the Map<String,String>
in EnvironmentPostProcessorImpl
class available to other Java classes to access and in yaml files using placesholders Eg. url: "${URL}"
, if that's possible? Any reference would be helpful.