在 Play 1.x 中,您可以为生产和开发环境定义不同的配置:
# These are applied in the default 'dev' enviornment.
db=mem
mail.smtp=mock
# The following are only relevant if 'play id' = prod
%prod.db=mysql://prod@db.us.com/
%prod.mail.smtp.host=in.mailjet.com
%prod.mail.smtp.user=mailuser
%prod.mail.smtp.pass=pass
%prod.mail.smtp.channel=ssl
Play 2有类似的东西吗?