Bugfix: Can not read keycloak-server.json if the path contains a space
https://issues.jboss.org/browse/KEYCLOAK-892
This commit is contained in:
parent
1650cb33c6
commit
0755cb6996
1 changed files with 2 additions and 2 deletions
|
@ -110,15 +110,15 @@ public class KeycloakApplication extends Application {
|
|||
if (configDir != null) {
|
||||
File f = new File(configDir + File.separator + "keycloak-server.json");
|
||||
if (f.isFile()) {
|
||||
log.info("Load config from " + f.getAbsolutePath());
|
||||
node = new ObjectMapper().readTree(f);
|
||||
log.info("Loaded config from " + f.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
if (node == null) {
|
||||
URL resource = Thread.currentThread().getContextClassLoader().getResource("META-INF/keycloak-server.json");
|
||||
log.info("Load config from " + resource);
|
||||
node = new ObjectMapper().readTree(resource);
|
||||
log.info("Loaded config from " + resource);
|
||||
}
|
||||
|
||||
if (node != null) {
|
||||
|
|
Loading…
Reference in a new issue