1
시스템 속성으로 구성을 설정하는 핵심 라이브러리가 있습니다. 이것은 단위 테스트에서 작동Typesafe Config는 런타임에 설정된 시스템 속성을 사용하지 않습니다.
my.mail.from = "[email protected]"
my.mail.from = ${?mail.from}
:
mail.from = [email protected]
내가 좋아하는, 그들과 함께 내 설정을 무시하고 싶었다. 내 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]'
이 작업을 수행 할 수 없나요?