LoginSignup
7
6

More than 5 years have passed since last update.

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

Last updated at Posted at 2014-02-04

環境

  • 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に追記し、ローカル開発環境を閉じるようにしています。

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6