问题描述:

Is it possible to override the default routes file by making it database driven in the playframework?

I want to be able to have routes defined in a more dynamic way instead of hard-coding the routes in a configuration file

网友答案:

Yes it is possible, just create a dynamic route as described in Dynamic parts spanning several / - then in your action divide parts by slash, validate how required and then make your query.

Depending on your DB response you can just call a method which returns a valid Result. That's all

相关阅读:
Top