Skip to content

Instantly share code, notes, and snippets.

@GuiSim
Created January 26, 2017 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuiSim/1bc6a07a133bc441bd16aea60cbc40fe to your computer and use it in GitHub Desktop.
Save GuiSim/1bc6a07a133bc441bd16aea60cbc40fe to your computer and use it in GitHub Desktop.
public static class MyServiceClass {
private AwsClient awsClient;
public MyServiceClass(@Named("aws.key") Prop<String> awsKey) {
this.awsClient = new AwsClient(awsKey.get());
awsKey.addCallback(() -> this.awsClient = new AwsClient(awsKey.get()));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment