Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ratpack.guice.Guice;
- import ratpack.server.RatpackServer;
- public class App {
- public static void main(String[] args) throws Exception {
- RatpackServer.start(ratpackServerSpec -> ratpackServerSpec.
- registry(Guice.registry(bindingsSpec -> bindingsSpec.
- module(FooModule.class)
- )).
- handlers(chain -> chain.
- get(ctx -> {
- Foo foo = ctx.get(Foo.class);
- ctx.getResponse().send(foo.msg);
- })
- )
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement