Kristian Frøhlich
01/08/2025, 7:16 PMfun config() = ConfigLoader.builder()
.addEnvironmentSource()
.addPreprocessor(
VaultSecretPreprocessor(
{
VaultTemplate(
VaultEndpoint.create("MY_HOST", MY_PORT),
TokenAuthentication("MY_TOKEN")
)
}
)
)
.addResourceSource("/application.conf")
.withExplicitSealedTypes()
.build()
.loadConfigOrThrow<Config>()
Are there any elegant way of resolving the env variables here or is the easiest to just fall back to System.getEnv(...)
?