Fixed classLoader
This commit is contained in:
parent
91c25084cd
commit
4c900e6864
|
@ -31,9 +31,10 @@ public class Constants {
|
|||
try {
|
||||
if(clientSecret==null) {
|
||||
Properties properties = new Properties();
|
||||
URL url = Constants.class.getClassLoader().getResource(CLIENT_SECRET_FILENAME);
|
||||
ClassLoader classLoader = Constants.class.getClassLoader();
|
||||
URL url = classLoader.getResource(CLIENT_SECRET_FILENAME);
|
||||
logger.trace("Going to read {} at {}", CLIENT_SECRET_FILENAME, url.toString());
|
||||
InputStream input = ClassLoader.getSystemClassLoader().getResourceAsStream(CLIENT_SECRET_FILENAME);
|
||||
InputStream input = classLoader.getResourceAsStream(CLIENT_SECRET_FILENAME);
|
||||
properties.load(input);
|
||||
int index = context.indexOf('/', 1);
|
||||
String root = context.substring(0, index == -1 ? context.length() : index);
|
||||
|
|
Loading…
Reference in New Issue