Custom configuration files - Play! Framework 2.0

前端 未结 4 1306
离开以前
离开以前 2021-01-05 05:58

I have a question about loading properties from custom configuration files. I have tried two different approaches to loading my oauth.properties file but I can\

4条回答
  •  孤街浪徒
    2021-01-05 06:19

    What worked for me with a file in /conf:

    import com.typesafe.config.ConfigFactory
    
    val myConfig = ConfigFactory.load("myfile.properties").getConfig("my.config.prefix")
    

提交回复
热议问题