In Play, when overloading controller methods, those individual methods cant be routed more than once cause the complier doesn't like it.
Is there a possible way to get around this?
Say if I had two functions in my Product
controller: getBy(String name)
and getBy(long id)
.
And I had two different routes for these functions declared in routes
:
GET /p/:id controllers.Product.getBy(id: Long)
GET /p/:name controllers.Product.getBy(name: String)
I want to use the "same" function for different routes, is this possible?