Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import ratpack.guice.Guice;
  2. import ratpack.server.RatpackServer;
  3.  
  4. public class App {
  5. public static void main(String[] args) throws Exception {
  6. RatpackServer.start(ratpackServerSpec -> ratpackServerSpec.
  7. registry(Guice.registry(bindingsSpec -> bindingsSpec.
  8. module(FooModule.class)
  9. )).
  10. handlers(chain -> chain.
  11. get(ctx -> {
  12. Foo foo = ctx.get(Foo.class);
  13. ctx.getResponse().send(foo.msg);
  14. })
  15. )
  16. );
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement