KEYCLOAK-3196: Test need ability to load keycloak-server.json from

/META-INF
This commit is contained in:
Stan Silvert 2016-08-23 11:14:40 -04:00
parent e4d97485ec
commit 3abcf713e5

View file

@ -233,6 +233,14 @@ public class KeycloakApplication extends Application {
}
}
if (node == null) {
URL resource = Thread.currentThread().getContextClassLoader().getResource("META-INF/keycloak-server.json");
if (resource != null) {
logger.loadingFrom(resource);
node = new ObjectMapper().readTree(resource);
}
}
if (node != null) {
Properties properties = new SystemEnvProperties();
Config.init(new JsonConfigProvider(node, properties));