玩!application.conf内容有点令人困惑 [英] play! application.conf content that's bit of confusing

查看:65
本文介绍了玩!application.conf内容有点令人困惑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用play 1.2.3,在application.conf中,它具有以下设置.每个设置是什么意思?似乎两者都已打开,哪一个优先?而且,如果我删除了第一个设置(DEV模式),则在运行该应用程序时没有获得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

推荐答案

application.mode 默认运行.

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

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

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

这意味着您可以为某些环境定义许多不同的配置.有关更多信息,请参见播放文档.

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

这篇关于玩!application.conf内容有点令人困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆