use of io.micronaut.context.env.yaml.YamlPropertySourceLoader in project micronaut-gcp by micronaut-projects.
the class LocalFileResourceLoader method main.
public static void main(String[] args) {
YamlPropertySourceLoader loader = new YamlPropertySourceLoader();
try {
String contents = LocalFileResourceLoader.loadSecret("first-gcp-project", "application");
AccessSecretVersionResponse response = AccessSecretVersionResponse.newBuilder().setName("foo").setPayload(SecretPayload.newBuilder().setData(ByteString.copyFrom(contents.getBytes())).build()).build();
loader.read("foo", contents.getBytes());
loader.read("foo", response.getPayload().getData().toByteArray());
} catch (IOException e) {
e.printStackTrace();
}
}
Aggregations