I had a question about loading properties from custom configuration files. I tried two different approaches to loading my oauth.properties file, but I cannot either work, so I hope someone here can help me.
The first approach I tried was to add the file to the conf directory and refer to it like this:
String oauthPropertiesFile = ClassLoader.getSystemResource("oauth.properties").getFile();
But it just returned NULL .
The second approach I'm trying to add is:
@include.oauthProperties = oauth.properties
to the application.conf file, and then reference it in my controller like:
String clientId = oauthProperties.clientId;
However, this does not compile.
Can anyone shed some light on what I'm doing wrong here?
travega
source share