gpt4 book ai didi

scala - 如何在 Play Framework 2 中为我的所有路由添加前缀?

转载 作者:行者123 更新时间:2023-12-04 08:59:03 24 4
gpt4 key购买 nike

在 play 1.x 你有 http.path 参数,它允许你设置一个 url 以添加到每个路由

http.param

我怎样才能在 play 2.0 中实现类似的东西?

最佳答案

在 Play 2.1 中,您可以使用以下选项来做到这一点 conf/application.conf :

application.context="/your/prefix"

从 Play 2.4 开始,这个属性被称为 play.http.context (取自 Gman 的评论)。

关于scala - 如何在 Play Framework 2 中为我的所有路由添加前缀?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11925345/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com