Playframework StackOverflower错误,因为“大”;conf/routes";播放版本2.0.1中的文件
在我的项目中,我希望有干净的URL。因此,我在conf/routes中创建如下条目:Playframework StackOverflower错误,因为“大”;conf/routes";播放版本2.0.1中的文件,playframework,playframework-2.0,Playframework,Playframework 2.0,在我的项目中,我希望有干净的URL。因此,我在conf/routes中创建如下条目: GET /switzerland controllers.Application.country(countryCode = "CH") GET /germany controllers.Application.country(countryCode = "DE") ... GET /:countryCode controllers.Application.country(countr
GET /switzerland controllers.Application.country(countryCode = "CH")
GET /germany controllers.Application.country(countryCode = "DE")
...
GET /:countryCode controllers.Application.country(countryCode: String)
我的列表超过130个条目,创建了一个StackOverflower错误。非常感谢您对如何防止错误的任何帮助。也许这个问题还有一个更优雅的解决方案
Java版本:
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-11M3646)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)
非常感谢你的帮助
我创建了一个小样本项目,以复制它(至少在我的Mac上):
事实上,问题已经出现,所以我认为最好的解决办法是 同时,您可以通过一条路线快速轻松地解决此问题:
GET /:countryName controllers.Application.country(countryName : String)
然后在country()
编辑:
顺便说一句,使用这种方法将更容易使用UTF链接,即domain.tld/МСС́呫
,而不是domain.tld/Russia
确实,问题发生了,所以我认为更好的地方应该是
同时,您可以通过一条路线快速轻松地解决此问题:
GET /:countryName controllers.Application.country(countryName : String)
然后在country()
编辑:
顺便说一句,使用这种方法将更容易使用UTF链接,即domain.tld/МСС́
而不是domain.tld/rusia
MacBook Air与之有何关系?MacBook Air与之有何关系?非常感谢您的回答!不客气:)请您在Play's Lighthous为这个问题制作一张票好吗?完成:非常感谢您的回答!不客气:)请您在Play's Lighthous为这一问题创建一张票子好吗?完成: