Skip to content

Instantly share code, notes, and snippets.

@norbertpotocki
Created March 17, 2016 23:38
Show Gist options
  • Save norbertpotocki/0c0b5b9aa9d11c06c937 to your computer and use it in GitHub Desktop.
Save norbertpotocki/0c0b5b9aa9d11c06c937 to your computer and use it in GitHub Desktop.
Configuration injection via “interface binding” (will reload as config changes)
SearchConfig config = configurationProvider.bind("search", SearchConfig.class);
// in search method
if(queryEmpty()) {
return config.defaultQuery();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment