@@ -0,0 +1,971 @@
+package xyz.nedderhoff.dropwizard.resources;%0A%0Aimport java.util.concurrent.atomic.AtomicLong;%0A%0Aimport javax.ws.rs.GET;%0Aimport javax.ws.rs.Path;%0Aimport javax.ws.rs.Produces;%0Aimport javax.ws.rs.QueryParam;%0Aimport javax.ws.rs.core.MediaType;%0A%0Aimport com.codahale.metrics.annotation.Timed;%0A%0Aimport xyz.nedderhoff.dropwizard.api.Saying;%0A%0A%0A@Path(%22/hello-world%22)%0A@Produces(MediaType.APPLICATION_JSON)%0Apublic class HelloWorldResource %7B%0A    private final String template;%0A    private final String defaultName;%0A    private final AtomicLong counter;%0A%0A    public HelloWorldResource(String template, String defaultName) %7B%0A        this.template = template;%0A        this.defaultName = defaultName;%0A        this.counter = new AtomicLong();%0A    %7D%0A%0A    @GET%0A    @Timed%0A    public Saying sayHello(@QueryParam(%22name%22) String name) %7B%0A%0A        final String value = String.format(template, name == null ? defaultName : name);%0A        return new Saying(counter.incrementAndGet(), value);%0A    %7D%0A%7D%0A

Create resource