玩! application.conf 内容有点令人困惑

发布于 2024-12-17 14:37:59 字数 322 浏览 4 评论 0原文

我使用的是play 1.2.3,在application.conf中,它有以下设置。每个设置的含义是什么?好像都开启了,哪个优先?另外,如果我删除第一个设置(DEV 模式),则运行应用程序时不会获得 PROD 模式,我是否遗漏了任何内容?

# Application mode
# ~~~~~
# Set to dev to enable instant reloading and other development help.
# Otherwise set to prod.
application.mode=dev
%prod.application.mode=prod

I am using play 1.2.3, in the application.conf, it has the following settings. What does each setting mean? It seems both are turned on, which one will take the priority? And also, if I remove the first setting (DEV mode), I don't get the PROD mode when run the app, am I missing anything?

# Application mode
# ~~~~~
# Set to dev to enable instant reloading and other development help.
# Otherwise set to prod.
application.mode=dev
%prod.application.mode=prod

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

黯淡〆 2024-12-24 14:37:59

application.mode 默认运行。

当您使用生产模式开关运行时,另一个会运行。例如,如果您像下面这样启动应用程序,

play run myapp --%prod

它将使用 prod.application.mode 配置。

这意味着您可以为某些环境定义许多不同的配置。有关详细信息,请查看 Play 文档 上的信息。

application.mode is run by default.

the other one runs when you are running with a prod mode switch. For example, if you start your application like the following

play run myapp --%prod

it will use the prod.application.mode config.

This means that you can define many different configurations for certain environments. For more information, check out this information on the Play documentation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文