Last active
August 29, 2015 14:20
-
-
Save brendonanderson/947aae10e4f858cc0c92 to your computer and use it in GitHub Desktop.
Ratpack Blog - Bind complex module
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
ratpack { | |
bindings { | |
ConfigData configData = ConfigData.of().yaml(ClassLoader.getSystemResource('application.yml')).build() | |
add new MyModule(configData.get('/environment', String)) | |
} | |
handlers { | |
handler('mymapping') { ComplexClass complexClass -> | |
complexClass.doSomethingCool() | |
... | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment