1
システムプロパティとして設定を行うコアライブラリがあります。Typesafe Configは実行時に設定されたシステムプロパティを取得しません
mail.from = [email protected]
私は次のように、彼らと私の設定を上書きしたい:これは、ユニットテストで動作
my.mail.from = "[email protected]"
my.mail.from = ${?mail.from}
。私のPlay(2.6)アプリケーションではそうではありません。
PropertiesConfiguration.init() // this inits the system properties
info("mail.from: " + sys.props.get("mail.from")) // >> '[email protected]' as expected
val config = ConfigFactory.load()
info("my.mail.from: " + config.getString("my.mail.from")) // >> '[email protected]' instead of '[email protected]'
これはできないのですか、何か迷っていますか?