If anyone is looking for something more plug-and-play, I've wrapped the 
Squarespace plugin in a dropwizard-like toolkit. Here's a stripped-down 
example GWizard service:

public class Main {
    @Path("/hello")
    public static class HelloResource {
        @GET
        public String hello() {
            return "hello, world";
        }
    }

    public static class MyModule extends AbstractModule {
        @Override
        protected void configure() {
            bind(HelloResource.class);
        }
    }

    public static void main(String[] args) throws Exception {
        Guice.createInjector(new MyModule(), new 
JerseyModule()).getInstance(WebServer.class).startJoin();
    }}


I personally think it's wiser to use the RESTEasy module, since it doesn't 
rely on manipulating private fields in Jersey, but if you are tied to 
Jersey this is probably the easiest option. The code and documentation are 
here:

https://github.com/stickfigure/gwizard

Cheers,
Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/980a9869-642b-40db-b99b-74bb8641244f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to