Skip to content

Instantly share code, notes, and snippets.

@jaydonnell
Created June 6, 2011 21:08
Show Gist options
  • Save jaydonnell/1011114 to your computer and use it in GitHub Desktop.
Save jaydonnell/1011114 to your computer and use it in GitHub Desktop.
scalate, guice, and jersey
@Path("/")
class HomeResource {
@Path("test")
@Produces(Array("application/json"))
@GET
def test(): String = {
return "{'foo': 'bar'}"
}
}
@mallman
Copy link

mallman commented Jun 6, 2011

imho this should look more like

class HomeResource(path = "/") {
get("test") = json("foo" -> "bar")
}

and it can probably be even nicer... ;)

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