by towelrod · 13y ago · 0 comments
class Hello {
def get() {
"Hello, world!"
}
}
I would prefer to see this and then let someone have a routing config somewhere else if they want to move the /hello endpoint.I've never liked the separate routing config approach. Play Framework uses(d?) it in the 1.x branch and I always found it annoying.
Similarly old-world Servlets were done that way too. You'd put the routing information in an XML file and the container would read it at start up.