Custom configuration files - Play! Framework 2.0

前端 未结 4 1308
离开以前
离开以前 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:07

    In a generic case, to fetch any File from the "/conf" directory, using Play 2.2 it can be done as follows (note that "/conf" is on the classpath, so you should not include it).

    Play.application().classloader().getResource("any_file");
    

提交回复
热议问题