Created
June 6, 2011 21:08
-
-
Save jaydonnell/1011114 to your computer and use it in GitHub Desktop.
scalate, guice, and jersey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Path("/") | |
class HomeResource { | |
@Path("test") | |
@Produces(Array("application/json")) | |
@GET | |
def test(): String = { | |
return "{'foo': 'bar'}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
imho this should look more like
class HomeResource(path = "/") {
get("test") = json("foo" -> "bar")
}
and it can probably be even nicer... ;)