GET 请求

@Path("/hello")
public class HelloResource {

    /**
     * A request to /hello would get the response "Hello World"
     */
    @GET
    public String exampleGet() {
        return "Hello World";
    }
    
    /**
     * A request to /hello/bob would get the response "Hello bob"
     */
    @Path("{name}")
    @GET
    public String exampleWithParameter(@PathParam("name") String name) {
        return "Hello " + name;
    }

}