user1269497
user1269497

Reputation: 41

How do I define routes in play framework2.0 such as {controller}.{action}

in play framework 1.0 * /{controller}/{action} {controller}.{action} how do I define in play2.0

Upvotes: 2

Views: 296

Answers (1)

huzeyfe
huzeyfe

Reputation: 3704

It is similar but it has a little bit different syntax.

GET   /clients/:id          controllers.Clients.show(id: Long)

Main difference is parameters. In play 1.2.x it was /clients/{id} and also note that in action you need to define parameter and unlike Java convention you define type after parameters (Scala style)

For more information please refer: JavaRouting

Upvotes: 2

Related Questions