Help us understand the problem. What is going on with this article?

application.confでの設定値を指定ファイルにて上書き Play Framework 2.2.x

More than 5 years have passed since last update.

環境

  • Mac OSX Version 10.8.5
  • Play Framework 2.2.1

手順

conf/以下に*.confを作る。

shell
$ touch conf/local.conf

*.confにてapplication.confを読み込み、上書きしたい設定を記述する。

shell
$ vi conf/local.conf
include "application.conf"

db.default.url="jdbc:mysql://database.localdomain/test_database" 

実行時に*.confを指定する。

shell
# DEVモードで実行する場合
play -Dconfig.file=local.conf run

参考

上記で作ったlocal.confを.gitignoreに追記し、ローカル開発環境を閉じるようにしています。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした