2

I am using play framework 1.2.5. If I use camelCase for my controller names, the URL appears to follow the same format. Is there anyway I can keep the camelcase for the controller names without needing to use camelCase in the resulting URL. I believe I could try something like the following (regex in routes.conf) but I was wondering if there is another way:

[aA]dmin

Thanks in advance.

4

1 回答 1

1

我对我的一个项目和全部线进行了快速测试

# Catch all
*       /{controller}/{action}                  {controller}.{action}

不区分大小写

所以你可以简单地使用

# Catch all
*       /{action}                  MyController.{action}

如果您想将管理方法公开为 /Admin /admin 甚至 /AdMiN

于 2013-04-26T19:47:51.813 回答