Created
March 17, 2016 23:38
-
-
Save norbertpotocki/0c0b5b9aa9d11c06c937 to your computer and use it in GitHub Desktop.
Configuration injection via “interface binding” (will reload as config changes)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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