Skip to content

Instantly share code, notes, and snippets.

@jagregory
Created April 11, 2011 21:11
Show Gist options
  • Save jagregory/914355 to your computer and use it in GitHub Desktop.
Save jagregory/914355 to your computer and use it in GitHub Desktop.
@Path("/customers")
class CustomerResource {
@GET
@Produces(Array(MediaType.APPLICATION_JSON))
@Path("{id}")
def getJson(@PathParam("id") id: Int) =
"Id requested was: " + id.toString()
}
@jagregory
Copy link
Author

Java, yeah. The more "modern" frameworks seem to be leaving XML behind in favour for Annotations/Attributes. One step forward, two steps back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment