3 ms·
The point is that you shouldn't have to configure things like @Path because they can be inferred from the class name. Why not: class Hello { def get() {
by towelrod 13y ago
The point is that you shouldn't have to configure things like @Path because they can be inferred from the class name. Why not:
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.
- Xorlev 13y agoIt doesn't work how you want it, fine, don't use it. It's super brief for the rest of us.
- meddlepal 13y agoSounds like a preferential thing then; I prefer to keep everything together. 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.